G
G
gregorypetrov2019-04-05 13:01:52
Python
gregorypetrov, 2019-04-05 13:01:52

Why doesn't Python see modules installed via pip?

Debian 7 Wheezy has Python 2.7.13 installed - the latest from version 2, as well as up-to-date pip.
I put the requests module:
pip install requests
Installation goes without errors, the module appears in the /usr/local/lib/python2.7/dist-packages folder . But when trying to import the module (import requests) in the script, an error occurs:
ImportError: No module named requests
If you try to do pip install requests again , the installer says that the module is already there:

Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages (2.21.0)

What can be wrong? Why does the installer say that the module already exists, is present in the requests modules folder, but python cannot import it when called either in the script or in the console?
(Same story with lxml and other modules that I installed via pip).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
generation_next, 2019-04-05
@generation_next

Dude, stupid question, but I'll ask it anyway.
Are you trying to run everything through pyCharm for an hour?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question