“ImportError: no module named 'requests'” after installing with pip

前端 未结 6 708
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 01:48

I am getting ImportError : no module named \'requests\'.

But I have installed the requests package using the command pip install req

6条回答
  •  生来不讨喜
    2021-01-04 02:27

    if it works when you do :

    python
    >>> import requests
    

    then it might be a mismatch between a previous version of python on your computer and the one you are trying to use

    in that case : check the location of your working python:

    which python And get sure it is matching the first line in your python code

    #!
    

提交回复
热议问题