setup.py installation and module search path

R

Russ

When I run setup.py to install a pure python package, is it supposed
to
automatically set my search path to find the installed modules? Or am
I
supposed to set my PYTHONPATH variable myself in my .bashrc file?

And what if I don't have root priviledge? Then what is supposed to
happen? Can anyone give me a clue? Thanks.
 
L

Larry Bates

Russ said:
When I run setup.py to install a pure python package, is it supposed
to
automatically set my search path to find the installed modules? Or am
I
supposed to set my PYTHONPATH variable myself in my .bashrc file?

And what if I don't have root priviledge? Then what is supposed to
happen? Can anyone give me a clue? Thanks.
I'm no expert, but I think what normally happens is the module gets
installed into ../pythonxx/lib/site-packages/<module> and if it
installs __init__.py file there they get automatically searched.
At least that the way things work for me.

-Larry
 
R

Russ

Larry said:
I'm no expert, but I think what normally happens is the module gets
installed into ../pythonxx/lib/site-packages/<module> and if it
installs __init__.py file there they get automatically searched.
At least that the way things work for me.

But if I don't have root priviledge, that doesn't happen. Is there a
setup.py option to get a
package installed just in my own account in such a way that my module
search path gets
updated?
 
G

Gabriel Genellina

But if I don't have root priviledge, that doesn't happen. Is there a
setup.py option to get a
package installed just in my own account in such a way that my module
search path gets
updated?

Use the --home option (or --prefix). You may need to set the PYTHONPATH
environment variable to ~/lib/python
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top