installing swampy for portable python for windows

I can not complete large exercises in this python book
http://www.greenteapress.com/thinkpython/index.html

attempting to install swampy on portable python for windows
(
errors installing non portable python for windows is another question
http://www.experts-exchange.com/Programming/Languages/Scripting/Python/Q_28468674.html
)
http://www.greenteapress.com/thinkpython/swampy/
http://www.greenteapress.com/thinkpython/swampy/install.html

python.exe
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
>>> import Tkinter
>>> Tkinter -v
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'v' is not defined
>>> Tkinter
<module 'Tkinter' from 'C:\Users\Acer\Documents\portable-python\Portable Python
2.7.2.1\App\lib\lib-tk\Tkinter.py'>
>>> import swampy.TurtleWorld
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named swampy.TurtleWorld
>>> pip install swampy
  File "<stdin>", line 1
    pip install swampy
              ^
SyntaxError: invalid syntax
>>> import install
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named install
>>> import pip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pip
>>>

Open in new window

LVL 1
rgb192Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gelonidaCommented:
You have to type pip install from the command line  (a cmd window) and not from within a python shell.

Pip is a tool which you must have installed for your python release.

Check whether you have pip installed:
   If your python executable is for example C:\Python27\python.exe
then pip will probably be in C:\Python27\Scripts\pip.exe

Either add C:\Python27\Scripts to you rsearch path or type
C:\Python27\Scripts\pip.exe install swampy

Open in new window


Alternatively you can use easy_install, but I also don't know whether you installed already easy_install on your amchine

However I do not know swampy
0
rgb192Author Commented:
there is
/app/scripts/
but no
/scripts/

app-scripts
0
gelonidaCommented:
Ah yes,
I forgot you're using portable python.

Well it seems you don't have pip.exe installed but you have easy_install.exe
so try following from a cmd.exe window.

Open a cmd window:
go to your portable python directory (wherever it is installed on your PC)
e.g

cd /d C:\portable-python\Portable Python2.7\

Open in new window


Now try to install swampy with easy_install.
App\Scripts\easy_Install swampy

Open in new window


You can also install pip with easy_install.
App\Scripts\easy_Install pip

Open in new window


I would add the path to of the App\Scripts directory to your search path, so that you can just type
easy_install
without having to specify the full path
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgb192Author Commented:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd ../../users/acer/documents/portable-python

C:\Users\Acer\Documents\portable-python>cd "portable python 2.7.2.1"

C:\Users\Acer\Documents\portable-python\Portable Python 2.7.2.1>cd app/scripts

C:\Users\Acer\Documents\portable-python\Portable Python 2.7.2.1\App\Scripts>easy
_install swampy
Searching for swampy
Reading http://pypi.python.org/simple/swampy/
Best match: swampy 2.1.7
Downloading https://pypi.python.org/packages/source/s/swampy/swampy-2.1.7.zip#md
5=690d64aabce9280dc0370c1103eb184e
Processing swampy-2.1.7.zip
Running swampy-2.1.7\setup.py -q bdist_egg --dist-dir c:\users\acer\appdata\loca
l\temp\easy_install-qsprfx\swampy-2.1.7\egg-dist-tmp-2zvwct
zip_safe flag not set; analyzing archive contents...
swampy.Lumpy: module MAY be using inspect.stack
Adding swampy 2.1.7 to easy-install.pth file

Installed c:\users\acer\documents\portable-python\portable python 2.7.2.1\app\li
b\site-packages\swampy-2.1.7-py2.7.egg
Processing dependencies for swampy
Finished processing dependencies for swampy

C:\Users\Acer\Documents\portable-python\Portable Python 2.7.2.1\App\Scripts>easy
_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=0
1026f87978932060cc86c1dc527903e
Processing pip-1.5.6.tar.gz
Running pip-1.5.6\setup.py -q bdist_egg --dist-dir c:\users\acer\appdata\local\t
emp\easy_install-iozmqz\pip-1.5.6\egg-dist-tmp-yvretq
warning: no files found matching 'pip\cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'do
cs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing pip-script.py script to C:\Users\Acer\Documents\portable-python\Porta
ble Python 2.7.2.1\App\Scripts
Installing pip.exe script to C:\Users\Acer\Documents\portable-python\Portable Py
thon 2.7.2.1\App\Scripts
Installing pip.exe.manifest script to C:\Users\Acer\Documents\portable-python\Po
rtable Python 2.7.2.1\App\Scripts
Installing pip2.7-script.py script to C:\Users\Acer\Documents\portable-python\Po
rtable Python 2.7.2.1\App\Scripts
Installing pip2.7.exe script to C:\Users\Acer\Documents\portable-python\Portable
 Python 2.7.2.1\App\Scripts
Installing pip2.7.exe.manifest script to C:\Users\Acer\Documents\portable-python
\Portable Python 2.7.2.1\App\Scripts
Installing pip2-script.py script to C:\Users\Acer\Documents\portable-python\Port
able Python 2.7.2.1\App\Scripts
Installing pip2.exe script to C:\Users\Acer\Documents\portable-python\Portable P
ython 2.7.2.1\App\Scripts
Installing pip2.exe.manifest script to C:\Users\Acer\Documents\portable-python\P
ortable Python 2.7.2.1\App\Scripts

Installed c:\users\acer\documents\portable-python\portable python 2.7.2.1\app\li
b\site-packages\pip-1.5.6-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

C:\Users\Acer\Documents\portable-python\Portable Python 2.7.2.1\App\Scripts>

Open in new window



Now it is installed thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.