473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to find site-packages path

Hi,

I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.

Any clue ?

Regards,

Philippe

--
***************************
Philippe C. Martin
SnakeCard LLC
www.snakecard.com
***************************

Jul 18 '05 #1
3 1652
Philippe C. Martin wrote:
Hi,

I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.
You can take a look at how this is done in Lib/site.py.

Look for the bit of code that starts with

prefixes = [sys.prefix]
sitedir = None # make sure sitedir is initialized because of later 'del'
....

etc.

--
Vincent Wehren


Any clue ?

Regards,

Philippe

Jul 18 '05 #2
Philippe C. Martin wrote:
I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.


The flawless way would be to use distutils. In fact you shouldn't even
need your own install script--it should do most of the work for you.
--
Michael Hoffman
Jul 18 '05 #3
Michael Hoffman wrote:
Philippe C. Martin wrote:
I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.

The flawless way would be to use distutils. In fact you shouldn't even
need your own install script--it should do most of the work for you.


can distutils install in any directory? for example, an application
which has its own modules should be completely isolated from the general
Python module namespace. how would you make distutils install in a
completely separate directory hierarchy and not touch any of the
site-packages directories or files?

it looked like that was impossible from the documentation which is why I
wrote my own installer.

---eric

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fabrice Labrousse | last post by:
Hello, Here is a hard problem i cannot solve about window.opener method I think you'll need to be a specialist to find the solution... i can't find the solution by myself ! Please help me. Here...
1
by: TRI_CODER | last post by:
I am trying to solve the following exception. The exception occurs when my ASP.NET code behind code attemtps to access a remore site using SSL. Please note that all certificates are valid and the...
4
by: Laurence Neville | last post by:
I have just set up an ASP-based site to a new Windows 2003 SP1 server with IIS 6.0. Before now the site has run under IIS 5.0 on Windows 2000. Every time an ASP page is opened, IE shows the...
2
by: James Foreman | last post by:
I'm building a revenue management tool and this requires some understanding of how good my forecast accuracy is. Therefore I'm trying to collect the mean absolute percentage error (MAPE) on a...
1
by: Amir Eshterayeh | last post by:
Dear Friends How things going well. I have a question. Please help me. Thanks in advance. I like to give our customers a web site in our site i.e www.ourdomain.com/JackSalume...
5
by: kevin goff | last post by:
I am seeing that our CPU spikes for several minutes at 100% for the asp.net process. This happens several times a day and seems to last for 10 min or so and use a lot of memory. I'm trying to...
8
by: Michael | last post by:
I am running a web server (IIS) on Windows 2003 SP 1. My ASP.NET C# applications run fine. However, my application is a combination of Classic ASP and C#. For some reason when you attempt to...
1
by: John A Grandy | last post by:
Visual Studio 2005 RC. I create my first ASP.NET 2.0 Web Site at c:\code\my-app , and when I attempt to compile I receive about 30 errors related to the compiler not being able to find schema...
17
by: Brett | last post by:
I'd like references on where to find some good (quality) icons to use for form and application icons (for the EXE). Most of the free stuff isn't that great looking and there isn't a good...
6
by: jrpfinch | last post by:
I have a table with two columns: siteID (int primary key) and siteName (varchar(50) unique constraint). I am completely new to databases and UDFs and would like to write a function that looks...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.