It could not find the path of the python interpretor after typing pipenv shell After activating the environment manually pip freeze grabing all the dependencies from main python environment.
-
Include specific steps in your question that would allow others to try reproducing the issue. – vanadium Apr 28 '22 at 06:14
-
I encountered a similar problem as well in [this question](https://askubuntu.com/questions/1406304/virtualenv-installs-envs-into-local-bin-instead-of-bin). I also included the reason why `virtualenv` installs into /local/ folder instead in 22.04. Could this be related? – icezyclon May 04 '22 at 08:53
4 Answers
For me upgrading to 22.04 broke some of the python 2.7 packages randomly, reinstalling all the pip packages fixed it for me:
pip list | awk -F ' ' '{print $1}' | xargs -L1 -I{} pip install --upgrade --force-reinstall {}
- 7,707
- 9
- 46
- 51
I was having a very similar issue. How I ended up resolving it in a rather inelegant way was to wipe out just about everything in ~/.local/ related to python and then reinstalling pipenv using pipx.
I was not able to track down which user installed package was causing the problem, but this did make it possible for me to continue working.
In retrospect, I wish I had done a pip list --user before blowing everything away.
- 11
- 2
someone have already discussed about it too, check this link for more details.
In a hurry ?
run this before using pipenv:
$ export SETUPTOOLS_USE_DISTUTILS=stdlib
- 11
- 2
-
1pipenv and venv are different things, and also most of us use IDE to activate venv so you don't have to do it every time manually. Your answer just doesn't answer the question. – user2678074 May 04 '22 at 10:53
-
I experienced the same problem with my virtualenv environments after updating to Ubuntu 22.04 from 20.04. Deleting the virtual environments and reinstalling them solved the problem perfectly. You may also have to install the 'virtualenv' package before doing that. The package disappeared after the upgrade.
- 11
- 1