R
R
ruslan25702019-02-21 15:43:45
linux
ruslan2570, 2019-02-21 15:43:45

How to fix an error in installing a module in python3?

when installing the requests module, it gives an error

The directory '/home/ruslan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.                                                                                                                                       
The directory '/home/ruslan/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.                                                                                                                                              
Requirement already satisfied: requests in ./.local/lib/python3.6/site-packages
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: idna<2.9,>=2.5 in ./.local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests)
If you run without sudo you get another error
Traceback (most recent call last):                                                                                                                                                              
  File "/home/ruslan/.local/bin/pip3", line 7, in <module>                                                                                                                                      
    from pip._internal import main                                                                                                                                                              
ModuleNotFoundError: No module named 'pip._internal'
how to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgen, 2019-02-21
@ruslan2570

The error says that there are no rights to the folder
UPD0: Try it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question