-
Create the venv and fix permissions:
sudo virtualenv --python=python3 ~/weblate-env sudo chown -R {YOUR USERNAME}:{YOUR USERNAME} /home/{YOUR USERNAME}/weblate-env-2
-
Activate, or step into, the virtual environment:
Source ~/weblate-env/bin/activate
-
Deactivate, or step out of, the virtual environment:
deactivate
Used for python packages, similar to apt-get
-
Install a package:
pip install {NAME}
Note: Don't use sudo in pip when in a virtual environment!
-
If you get
permission denied
as an error, you have to perform the permission fix for your venv again:sudo chown -R {YOUR USERNAME}:{YOUR USERNAME} /home/{YOUR USERNAME}/weblate-env-2
-
If you get errors like
package not found
ordependency error
, there is likely something wrong with the package, but try several different install options to ensure it is not on your side.
If you get an error that says package not found
, try installing it with sudo apt-get
Sometimes it's worth googling the error; sometimes the package name is different