Compiling and transporting modules/libraries in python

A

Abe

Hi all -
I hope this is a simple question, but I've been running in circles
trying to figure it out myself. Is there a good way to wrap up a
library (e.g. numpy or matplotlib) so that I can use it on another
machine without actually installing it?

I use python at a home office and in a university computer lab,
but I don't have the administrative rights to install libraries on the
lab computers. It would be really nice if there were a way I could
put, say, all of numpy into a file "my_numpy.pyc" and treat it as a
single (large) module.

thanks
-Abe

PS - If the answer somehow involves compileall, could you spell it out
for me? I haven't been able to figure how to make compileall work for
this.
 
A

alex23

    I use python at a home office and in a university computer lab,
but I don't have the administrative rights to install libraries on the
lab computers.  It would be really nice if there were a way I could
put, say, all of numpy into a file "my_numpy.pyc" and treat it as a
single (large) module.

You should be able to use virtualenv to provide this functionality:

http://pypi.python.org/pypi/virtualenv

Create the environment you want on your home computer, then copy it
wholesale to your lab computer or even use it directly from a USB
device.

You might also want to look into one of the portable Python set ups.
This way you can have a fully portable environment that you control
completely:

Portable Python: http://www.portablepython.com/
Movable Python: http://www.voidspace.org.uk/python/movpy/

Hope this helps.

alex23
 
A

Abe

alex23 -
Thanks for the tips. I'm using portable python and it's working
great so far. I'll come back and try virtualenv if I get stuck again.
- Abe
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top