cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9276
Views
0
Helpful
2
Replies

Python virtual environment , requests module issue ModuleNotFoundError: No module named 'requests'

Hello Sir,

 

Could you please give me some support on this issue ?

 

I do install "requests" module in my python virtual environment but when I tried to import requests , it told me

"No module named requests".   I am very confused.

 

Thank you for your help

 

################issue###################

>>> import requests

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'requests'

>>>

#######################################

 

Virtual Environment

 

zwh@zwh-PC MINGW64 /d/Technical/LAB/dne-dna-code

$ source venv/Scripts/activate

(venv)

zwh@zwh-PC MINGW64 /d/Technical/LAB/dne-dna-code

$ python -i

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> exit()

(venv)

zwh@zwh-PC MINGW64 /d/Technical/LAB/dne-dna-code

 

 

 

python version

$ python --version

Python 3.6.4

(venv)

zwh@zwh-PC MINGW64 /d/Technical/LAB/dne-dna-code

$

 

Pip list

$ pip list

Package               Version

--------------------- ----------

appdirs               1.4.4

astroid               2.4.1

bcrypt                3.1.7

certifi               2020.4.5.1

cffi                  1.14.1

chardet               3.0.4

ciscosparkapi         0.9.2

colorama              0.4.3

cryptography          3.0

distlib               0.3.1

filelock              3.0.12

flake8                3.8.2

future                0.18.2

idna                  2.7

importlib-metadata    1.6.0

importlib-resources   3.0.0

isort                 4.3.21

Jinja2                2.11.2

lazy-object-proxy     1.4.3

lxml                  4.5.2

MarkupSafe            1.1.1

mccabe                0.6.1

ncclient              0.6.0

netmiko               1.4.2

paramiko              2.7.1

pip                   20.2.2

prettytable           0.7.2

pyang                 1.7.4

pycodestyle           2.6.0

pycparser             2.20

pyflakes              2.2.0

pylint                2.5.2

PyNaCl                1.4.0

PyYAML                5.3.1

requests              2.20.0

requests-toolbelt     0.9.1

scp                   0.13.2

setuptools            28.8.0

six                   1.15.0

toml                  0.10.1

typed-ast             1.4.1

urllib3               1.24.2

virtualenv            20.0.31

virtualenvwrapper-win 1.2.6

wrapt                 1.12.1

xmltodict             0.11.0

yapf                  0.30.0

zipp                  3.1.0

 

 

 

enter Python interconnection

zwh@zwh-PC MINGW64 /d/Technical/LAB/dne-dna-code

$ python -i

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>>

 

 

>>> import requests

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'requests'

>>>

Jacky Zhang
Global Telecom
1 Accepted Solution

Accepted Solutions

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @Jacky_hotel_california 

Have you tried reinstalling it in the venv?

pip uninstall requests
pip install requests

Stay safe,

Sergiu

View solution in original post

2 Replies 2

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @Jacky_hotel_california 

Have you tried reinstalling it in the venv?

pip uninstall requests
pip install requests

Stay safe,

Sergiu

Hi Sergiu,

 

Thank you for your reply and help.

 

I think it will be fixed. 

 

Take care.

 

BR

Jacky Zhang

Jacky Zhang
Global Telecom