Pipenv-Error: ModuleNotFoundError: No module named 'pip._internal'

主宰稳场 提交于 2019-12-03 13:08:24

Ubuntu 18.04, Python 3.6 :

Reinstalling pipenv did not work for me. Reinstall pip3 was the only issue, but

sudo apt install python3-pip

did not work too. Found a link to get pip3 in AskUbuntu.com which worked fine :

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py --force-reinstall

After trying around for a while, I fully reinstalled pip. This solved the problem and everything is working now as expected.

Before providing the two commands, which solved the problem, I want to specify some things:

  • I'm on MacOS
  • python stands for python3 (added an alias for that, because I only use python3)
  • pip is on version 9 and NOT 10

Here are both commands:

sudo pip uninstall pip
sudo python get-pip.py

I have had the same issue (python 3.5/Ubuntu 16.04LTS). Reinstalling pip with:

sudo apt install python-pip python-pip3 --reinstall

didn't solve the issue with me.

What worked in my case was reinstalling pipenv itself, from pip:

sudo pip3 install pipenv --force-reinstall

If you are running python 2.x or if your system is different than mine, you can try to replace pip3 with pip in the command:

sudo pip install pipenv --force-reinstall
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!