installing requests module in python 2.7 windows

后端 未结 4 1473
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 03:37

I am facing issues while installing request module (python 2.7) on windows.

Tried the below steps as per documentation:

1

pip

相关标签:
4条回答
  • 2020-12-09 04:10

    On windows 10 run cmd.exe with admin rights then type :

    1) cd \Python27\scripts

    2) pip install requests

    It should work. My case was with python 2.7

    0 讨论(0)
  • 2020-12-09 04:21

    There are four options here:

    1. Get virtualenv set up. Each virtual environment you create will automatically have pip.

    2. Get pip set up globally.

    3. Learn how to install Python packages manually—in most cases it's as simple as download, unzip, python setup.py install, but not always.

    4. Use Christoph Gohlke's binary installers.

    0 讨论(0)
  • 2020-12-09 04:22
    1. Download the source code(zip or rar package).
    2. Run the setup.py inside.
    0 讨论(0)
  • 2020-12-09 04:25

    If you want to install requests directly you can use the "-m" (module) option available to python.

    python.exe -m pip install requests

    You can do this directly in PowerShell, though you may need to use the full python path (eg. C:\Python27\python.exe) instead of just python.exe.

    As mentioned in the comments, if you have added Python to your path you can simply do:

    python -m pip install requests

    0 讨论(0)
提交回复
热议问题