Active1 year, 6 months ago
I am trying to install the requests module on Windows 10. I have Python 3.6 except I get this error: Exception: Traceback (most recent call last): File 'C: Stack Overflow. 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. Windows Instructions. If you prefer using your python interpreter, just right-click on the file get-pip.py and choose “open with” and then choose whatever python interpreter you care to use. If you prefer to install pip using the windows command line, navigate to whatever directory you’ve placed python and get-pip.py.
I have installed python 2.7,added the path in environment variables trying to import requests module in python IDLE.To install requests module i am trying to use
python -m pip install requests
but i am getting errorplease help me what can i do
Arpit Solanki5,95522 gold badges2121 silver badges4646 bronze badges
Sravani ChintaSravani Chinta
1 Answer
This answer won't tell you why you are getting that error, but suggests a workaround at the end.
Just a wild guess but perhaps the error is caused by not having the correct version of pip?
ajbazzajbazz
Not the answer you're looking for? Browse other questions tagged python-2.7python-requests or ask your own question.
Active1 month ago
I'm having a hard time setting up python packages. EasyInstall from SetupTools is supposed to help that, but they don't have an executable for Python 2.6.
For instance to install Mechanize, I'm just supposed to put the Mechanize folder in C:Python24Libsite-packages according to INSTALL.txt, but runnning the tests does not work. Can someone help shed some light on this? Thanks!
CCovey80311 gold badge1010 silver badges1717 bronze badges
echoblazeechoblaze4,6401313 gold badges4040 silver badges4949 bronze badges
12 Answers
The accepted answer is outdated. So first,
pip
is preferred over easy_install
, (Why use pip over easy_install?). Then follow these steps to install pip
on Windows, it's quite easy.- Install
setuptools
: - Install
pip
: - Optionally, you can add the path to your environment so that you can use
pip
anywhere. It's somewhere likeC:Python33Scripts
.
Community♦
h--nh--n4,95044 gold badges2424 silver badges2929 bronze badges
Newer versions of Python for Windows come with the pip package manager. (source)
pip is already installed if you're using Python 2 >=2.7.9 or Python 3 >=3.4
Enflow, Iv fluid / blood warmer. Read online or download PDF. GE Healthcare enFlow IV Fluid and Blood Warmer - Brochure User Manual. Manuals Directory ManualsDir.com - online owner manuals library. EnFlow® IV fluid and blood warmer System manual enFlow products Controller, PN 980121EU The controller unit serves as the power supply for the warmer unit. It is designed to mount on an IV pole or sit on a table top. The front panel includes a temperature. Enflow recommends that the fluid warmer be placed 9 inches from the IV site. The EnFlow Power Unit (sold separately from the warmer) mounts on the IV pole and displays the heated fluid temperature. The fluid warmer is reusable with the purchase of disposable cartridges that contain the heating element that is inserted into the warmer with each use. Appendix B: Glossary enFlow IV Fluid/Blood The enFlow IV Fluid/Blood Warming System consists of three products: Warming System the Warmer (No. 980100), the Controller (No. 980121), and the Disposable Cartridge (No. 980200), which together form a system designed to warm intravenous fluids and blood products helping reduce hypothermic effects. Enflow fluid warmer service manual.
Use that to install packages:
So in your case it'd be:
DavidGInstall Requests Python 3
12.9k1111 gold badges3939 silver badges4949 bronze badges
Leif GruenwoldtLeif Gruenwoldt11.1k44 gold badges5050 silver badges6161 bronze badges
This is a good tutorial on how to get
easy_install
on windows. The short answer: add C:Python26Scripts
(or whatever python you have installed) to your PATH. goldenratiogoldenratio
You don't need the executable for setuptools.You can download the source code, unpack it, traverse to the downloaded directory and run
Rajapython setup.py install
in the command prompt1,59799 gold badges3232 silver badges6969 bronze badges
Lennart RegebroLennart Regebro123k3636 gold badges193193 silver badges232232 bronze badges
Starting with Python 2.7, pip is included by default. Simply download your desired package via
BlauhirnBlauhirn5,91433 gold badges3838 silver badges7070 bronze badges
As I wrote elsewhere
Packaging in Python is dire. The root cause is that the language ships without a package manager.
Fortunately, there is one package manager for Python, called Pip. Pip is inspired by Ruby's Gem, but lacks some features. Ironically, Pip itself is complicated to install. Installation on the popular 64-bit Windows demands building and installing two packages from source. This is a big ask for anyone new to programming.
So the right thing to do is to install pip. However if you can't be bothered, Christoph Gohlke provides binaries for popular Python packages for all Windows platforms http://www.lfd.uci.edu/~gohlke/pythonlibs/
In fact, building some Python packages requires a C compiler (eg. mingw32) and library headers for the dependencies. This can be a nightmare on Windows, so remember the name Christoph Gohlke.
Community♦
Colonel PanicColonel Panic86.8k6565 gold badges317317 silver badges403403 bronze badges
I had problems in installing packages on Windows. Found the solution. It works in Windows7+. Mainly anything with Windows Powershell should be able to make it work. This can help you get started with it.
- Firstly, you'll need to add python installation to your PATH variable. This should help.
- You need to download the package in zip format that you are trying to install and unzip it. If it is some odd zip format use 7Zip and it should be extracted.
- Navigate to the directory extracted with setup.py using Windows Powershell (Use link for it if you have problems)
- Run the command
python setup.py install
That worked for me when nothing else was making any sense. I use Python 2.7 but the documentation suggests that same would work for Python 3.x also.
Community♦
Aseem BansalAseem Bansal3,22288 gold badges3434 silver badges7272 bronze badges
You can also just download and run ez_setup.py, though the SetupTools documentation no longer suggests this. Worked fine for me as recently as 2 weeks ago.
Kevin HornKevin Horn
Or just put the directory to your pip executable in your system path.
Mona JalalMona Jalal9,7593636 gold badges126126 silver badges240240 bronze badges
As mentioned by Blauhirn after 2.7 pip is preinstalled. If it is not working for you it might need to be added to path.
However if you run Windows 10 you no longer have to open a terminal to install a module. The same goes for opening Python as well.
You can type directly into the search menu
pip install mechanize
, select command and it will install:If anything goes wrong however it may close before you can read the error but still it's a useful shortcut.
SimonSimon6,22166 gold badges3333 silver badges5151 bronze badges
pip is the package installer for python, update it first, then download what you need
Then:
PodTech.ioPodTech.io
Upgrade the pip via command prompt ( Python Directory )
Now you can install the required Module
Lova ChittumuriLova Chittumuri
protected by Community♦Aug 2 '15 at 2:27
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?