user12177026
user12177026

Reputation:

Python, pip not properly configured

I have a project that I have pulled from git, and ever since I have not been able to use pip very much, but using the Pycharm setting to install works, even more than that, I'm able to import the packges to the project (Django rest framework) and use it.

But when i'm trying to migrate/runserver I get an error:

ModuleNotFoundError: No module named 'djoser'
venv $ pip3 install djoser 

output:
Defaulting to user installation because normal site-packages is not writeable

This only apllies to the newly added packges and not the already used ones.

edit: this error pops up few times as well:

AttributeError: module 'lib' has no attribute 'X509_up_ref'

Upvotes: 2

Views: 135

Answers (1)

user12177026
user12177026

Reputation:

Had to go to a somewhat radical solution.

first, I uninstalled all pip that was on the system.

$ sudo -i
root ~# rm -f /bin/pip /bin/pip2 /bin/pip3

reinstall pip and OpenSSL

and for some reason that is not clear to me,

pip was installed properly to my machine's python 3.7 and not 3.8.

I decided to reconfigure venv and my project's interpreter to python 3.7 which fixed the problem.

Upvotes: 1

Related Questions