3

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.

Ashok
  • 31

4 Answers4

2

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 {}
1

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.

1

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
1

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.