相关文章推荐
苦恼的白开水  ·  windows关闭java进程·  8 月前    · 
苦恼的白开水  ·  SQLSERVER ...·  9 月前    · 
苦恼的白开水  ·  DataGrip PGSQL ...·  9 月前    · 
苦恼的白开水  ·  Torch not compiled ...·  10 月前    · 
暗恋学妹的投影仪  ·  《spring ...·  1小时前    · 
从容的排球  ·  异常 ...·  1小时前    · 
无邪的铁板烧  ·  mybatis 操作 oracle 报错 ...·  1小时前    · 
善良的骆驼  ·  ONNX未使用GPU·  1小时前    · 
好帅的海龟  ·  轻松学pytorch之使用onnx ...·  1小时前    · 
活泼的生姜  ·  21 Markdown格式 | R语言教程·  1小时前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Tried the below steps as per documentation:

pip install requests

error

'pip' is not recognized as an internal or external command, operable program or batch file.

easy_install requests

error

'easy_install' is not recognized as an internal or external command, operable program or batch file.

setup.py

error

C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe' warnings.warn(msg)
C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg)
C:\Location\Python\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help
error: no commands supplied

Can anyone please advise how to install the module on windows , without downloading any new stuff.

pip and easy_install both require downloads. have you tried looking at setup.py and looking at the commands it takes? – TehTris Aug 20, 2013 at 22:11 You have to download something. Even if you had pip installed, and it did everything for you… it would obviously have to download requests to do that. So… what's the actual requirement you're asking for? – abarnert Aug 20, 2013 at 22:13 Anyway, you almost certainly want to either (a) get pip set up and just use that from now on, or (b) use Christoph Gohlke's binary packages and hope you never need a package he hasn't built (or a newer version of one he has). I would strongly recommend (a)—you're a programmer, you should know how to use your machine—but (b) works too. – abarnert Aug 20, 2013 at 22:14 @abarnert mate all I am asking for is can I install requests, without downloading pip or easy_install – misguided Aug 20, 2013 at 22:15

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

Thanks! Since I have python added to my path, I just needed to do: python -m pip install requests – Rani Kheir Apr 21, 2016 at 9:15
  • Get virtualenv set up. Each virtual environment you create will automatically have pip.

  • Get pip set up globally.

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

  • Use Christoph Gohlke's binary installers.

  • Python 2.7.9+ and Python 3.4+ ship with PIP, so it very much depends exactly which version of Python 2.7 you were using. – Peter Schofield Jul 6, 2017 at 13:39

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.

     
    推荐文章
    善良的骆驼  ·  ONNX未使用GPU
    1小时前