PYTHONPATH x *.pth???

C

Carlos Moreira

I want to install Python third packages in a
non-default directory.
What´s the better way?

- PYTHONPATH variable?
- *.pth files in site-packages?

I know that the two methos above are equivalents. But
what method will be keep in future Python releases
(for example)?

[]´s

Cadu


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Carlos said:
I want to install Python third packages in a
non-default directory.
What´s the better way?

- PYTHONPATH variable?
- *.pth files in site-packages?

It depends on your requirements. For example:

- Why is it that you don't want to install the
packages in the default directory? Then, considering
that reason, why would it be acceptable to install
a .pth file there?

- Is it acceptable that users of your application set
PYTHONPATH?

- Do you have to consider multiple installations of Python

And so on.

You should also consider a third alternative:

- Extend sys.path explicitly in the application,
before importing the third package.
I know that the two methos above are equivalents. But
what method will be keep in future Python releases
(for example)?

Both with be kept indefinitely.

Regards,
Martin
 

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

Similar Threads

PYTHONPATH x *.pth??? 0
usage of .pth files 1
PYTHONPATH on OS X 4
.pth - howto? 4
Installing Pip onto a mac os x system 4
PYTHONPATH in Windows 3
PYTHONPATH and multiple python versions 0
PYTHONPATH vs PATH? 0

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top