L
L
leistolz2016-03-24 17:30:11
Python
leistolz, 2016-03-24 17:30:11

Why is the python module not included?

Greetings, I decided to start learning Python, I understood the basic essence, and decided to try the Requests module. I installed pip, using it I installed this very module, but when I start the program, it writes the following:

Traceback (most recent call last):
  File "G:\new 1.py", line 1, in <module>
    import requests
ImportError: No module named 'requests'

The code itself:
import requests 
r = requests.get('https://www.google.ru/')
r.status_code
r.encoding
r.text
r.json()

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
leistolz, 2016-03-24
@leistolz

I solved the problem by installing the module manually. Created a requests folder and dropped the whl file (module) into it

D
Dimonchik, 2016-03-24
@dimonchik2013

requests is the most popular installable module in general, a simple wrapper
use PyCharm to install

V
Vov Vov, 2016-03-24
@balamut108

Perhaps you have several versions of Python and pip installed only one, and you ran the code on another?

S
Shkurupii, 2016-03-24
@Shkurupii

enable debug. If the module has a command, it will pass without problems.

# python
>>> import requests
>>>
[2]+  Stopped                 python

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question