'Swampy' installation through 'pip'

R

Ronak Dhakan

I have just started learning python from How to Think Like a Computer Scientist. It requires me to install 'swampy' (http://www.greenteapress.com/thinkpython/swampy/install.html) which requires me to install 'pip' (https://pip.pypa.io/en/latest/installing.html). I think I was able to somehowinstall pip, but am unable to install swampy.

When i run 'pip install swampy' in windows command prompt, I get an error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Ronak>E:

E:\>pip install swampy
Fatal error in launcher: Unable to create process using '""E:\Program Files\Pyth
on 2.7.6\pythonw.exe"" "E:\Program Files\Python 2.7.6\Scripts\pip.exe" install s
wampy'

When I run 'pip install swampy' in IDLE (Python 2.7.6 Shell), I get thefollowing error:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
with the word install highlighted in red.

I have installed pip by opening it in IDLE & running it from there. A new folder 'Scripts' was created in the Python installation directory 'E:\Program Files\Python 2.7.6' with the following files:

easy_install-2.7.exe
easy_install.exe
pip2.7.exe
pip2.exe
pip.exe

I have added 'E:\Program Files\Python 2.7.6' & 'E:\Program Files\Python 2.7.6\Scripts' to the 'path' variable in Environment Variables in Windows.

I have added 'E:\Program Files\Python 2.7.6\Scripts' to the 'PYTHONPATH' variable in Environment Variables in Windows.

I have read a lot online trying to get it work, but now I am lost in the technical jargons. I might have missed some steps or done something incorrectly.

Please let me know where I went wrong or guide me on how to install swampy.

Thanks.

Ronak.
 
M

Mark Lawrence

I have just started learning python from How to Think Like a Computer Scientist. It requires me to install 'swampy' (http://www.greenteapress.com/thinkpython/swampy/install.html) which requires me to install 'pip' (https://pip.pypa.io/en/latest/installing.html). I think I was able to somehow install pip, but am unable to install swampy.

When i run 'pip install swampy' in windows command prompt, I get an error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Ronak>E:

E:\>pip install swampy
Fatal error in launcher: Unable to create process using '""E:\Program Files\Pyth
on 2.7.6\pythonw.exe"" "E:\Program Files\Python 2.7.6\Scripts\pip.exe" install s
wampy'

Your setup looks wrong, surely that should be python.exe, not pythonw.exe.

I'd recommend reinstalling and use the default settings, putting Python
at the top level of the disk and not in "Program Files", that's another
set of potential set of problems eliminated straight away.
 
C

Chris Angelico

I'd recommend reinstalling and use the default settings, putting Python at
the top level of the disk and not in "Program Files", that's another set of
potential set of problems eliminated straight away.

Second this recommendation. I saw some NEWS entries recently regarding
pip and spaces in file names.

If you're on the absolute latest pip, it would quite possibly work,
but I don't know if that works with 2.7, and if so, with which 2.7.x.
Avoid spaces unless you're sure.

In fact, looking at the error messages, I suspect this isn't a
*potential* set of problems, but quite probably the actual problem.

ChrisA
 
R

Ronak Dhakan

After reading the suggestions...

I uninstalled Python 2.7.6 from 'E:\Program Files\Python 2.7.6' & installed in 'C:\Python27'.

Then I put 'get-pip.py' file in 'C:\Python27' , opened command prompt, navigated to 'C:\Python27' & ran 'python get-pip.py' and pip was installed.

Then I navigated to 'C:\Python27\Scripts' in command prompt, ran 'pip install swampy' . And swampy was downloaded & installed.

Yeeaaayy !!! Problem solved !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top