Issue
Today, I installed Pipenv via
pip install pipenv
As mentioned in the documentation I went to a test directory and created a new virtual environment using
pipenv shell
and tried to install a package via
pipenv install numpy
I got the following error message:
Installing numpy…
⠧
Error: An error occurred while installing numpy!
Traceback (most recent call last):
File "/Users/florian/.local/share/virtualenvs/test-bJfQ6Jzk/bin/pip", line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'
This error occurs even after reinstalling pipenv, deleting all files and recreate the environment. It also had no impact if I ran pipenv install numpy
inside or outside the environment.
Python 3.6.3
Pipenv 11.10.1
Thank you in advance.
Solution
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
Answered By - Train
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.