installing swampy for portable python for windows

I can not complete large exercises in this python book

attempting to install swampy on portable python for windows
errors installing non portable python for windows is another question

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
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\App\lib\lib-tk\'>
>>> 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

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.

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
rgb192Author Commented:
there is
but no

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)

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
without having to specify the full path

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"

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

C:\Users\Acer\Documents\portable-python\Portable Python\App\Scripts>easy
_install swampy
Searching for swampy
Best match: swampy 2.1.7
Running swampy-2.1.7\ -q bdist_egg --dist-dir c:\users\acer\appdata\loca
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\app\li
Processing dependencies for swampy
Finished processing dependencies for swampy

C:\Users\Acer\Documents\portable-python\Portable Python\App\Scripts>easy
_install pip
Searching for pip
Best match: pip 1.5.6
Processing pip-1.5.6.tar.gz
Running pip-1.5.6\ -q bdist_egg --dist-dir c:\users\acer\appdata\local\t
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
no previously-included directories found matching 'docs\_build\_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing script to C:\Users\Acer\Documents\portable-python\Porta
ble Python\App\Scripts
Installing pip.exe script to C:\Users\Acer\Documents\portable-python\Portable Py
Installing pip.exe.manifest script to C:\Users\Acer\Documents\portable-python\Po
rtable Python\App\Scripts
Installing script to C:\Users\Acer\Documents\portable-python\Po
rtable Python\App\Scripts
Installing pip2.7.exe script to C:\Users\Acer\Documents\portable-python\Portable
Installing pip2.7.exe.manifest script to C:\Users\Acer\Documents\portable-python
\Portable Python\App\Scripts
Installing script to C:\Users\Acer\Documents\portable-python\Port
able Python\App\Scripts
Installing pip2.exe script to C:\Users\Acer\Documents\portable-python\Portable P
Installing pip2.exe.manifest script to C:\Users\Acer\Documents\portable-python\P
ortable Python\App\Scripts

Installed c:\users\acer\documents\portable-python\portable python\app\li
Processing dependencies for pip
Finished processing dependencies for pip

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

Open in new window

Now it is installed thanks.
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

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.