Create a Python virtual environment (venv) with no "pip" installed
- Inicie sesión ou rexístrese para enviar comentarios
As you might know Python's pip package manager has been removed from Trisquel repositories due to possibility of installing non-free software, However I installed it with the get-pip.py script provided in pip documentation. Now I'm trying to create a virtual environment with the following command:
python3.10 -m venv $HOME/project
But it complains:
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
How ever, while trying to install python3-venv with apt-get, I get the following error:
The following packages have unmet dependencies:
python3.10-venv : Depends: python3-pip-whl but it is not installable
E: Unable to correct problems, you have held broken packages.
How to install virtual-env in Trisquel?
Trisquel 11 does have python-pip:
sudo apt install python-pip
Installing it that way should hopefully set up your environment correctly. I haven't tried it myself, I haven't used any pip software for awhile.
Thanks for the reply but look at Eric's comment. The general issue is by removing python3-pip package from Trisquel repos, we are breaking the dependency tree for other packages as well.
That version of python-pip is for version python 2.7, which is not supported by the Python Software Foundation. I been wondering why python 2 is still in the repos.
It is still used on some niche areas of legacy technology or even for historical reasons, I don't think it will be removed any time soon.
I solved the issue. I downloaded "python3-pip-whl" package manually (from Debian archives) and now everything works fine.
- Inicie sesión ou rexístrese para enviar comentarios