Sign in to follow this  
revisioned

problem downloading a module in python

Recommended Posts

I'm following a tutorial and it's asking me to use the gasp module Well python doesn't have it so I tried to download it on the website: https://launchpad.net/gasp-code/+announcement/157 and I'm confused what to do I downloaded the source file and it came with a gasp folder and a setup.py I put them both in the lib folder and now I don't get how I use the module I tried using it in IDLE but it still can't be found I tried clicking the setup.py but it doesn't do anything

Share this post


Link to post
Share on other sites
The setup.py script must be run from the command-line. On Windows XP you can get there from Start->Run... and enter cmd.exe. I'm not familiar with Vista or other OS's but find out how to get to a command prompt.

At the command prompt type...

cd \folder-where-setup-is

then...

python setup.py install

That should work. If it says "'python' is not recognized..." etc. that means Python isn't on your path. You still may be able to run it given the full path (I'm not sure if it works this way), otherwise I guess learn how to add Python to your path.

c:\python25\python.exe setup.py install

More info at: Installing Python Modules

Share this post


Link to post
Share on other sites
i tried doing typing what you said in cmd but it says setup.py isn't recognized

i have no idea what to do... i have vista (i'm admin) and i have python saved on my D drive

i can do the cd part and it doesn't give me any errors but trying to install it says python is not recognized



as for the link I don't understand it at all...

Share this post


Link to post
Share on other sites

First move the gasp folder and files including the setup.py file out of the lib folder since they are not supposed to be there. Put them alone in some temporary folder. The setup script will copy what it needs to the correct location.

Then try the last method I gave for invoking python, but change it to match where your python.exe file actually is. So, after you cd to the temporary folder, let's say your python.exe is in D:\Python25 you would type:

D:\Python25\python.exe setup.py install

If it's somewhere else adjust the above command to reflect that.

Share this post


Link to post
Share on other sites
And make sure your Python directory and your Python/scripts directory are in your PATH variable. It makes life so much easier, since the Linux users assume Python is in your PATH, given that it is installed that way on every other platform except Windows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this