Search code examples
pythonpipvirtualenv

Pip not installed in virtualenv bin folder


I encountered a few similar issues on the site but none that seems to answer my issue.

I created a virtual env on ubuntu with the command: python3 -m venv test

Now when I activate my environnment and run which python, I get the python from my virtual env, but which pip gives me the global pip.

If I look at the bin/ folder I do have Python but no pip. Howhever, pip is installed in the sites-package directory.

Anyone has a hint ? I created previously another venv and didn't run into the same problem.

Thanks a lot


Solution

  • That sounds like something went wrong during the pip installation, however you can use python -m ensurepip to install pip afterwards.