473,545 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1660
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
1554
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 is the problem (quiet complicated to explain). I use two differents servers with two IIS 4.0 Web servers On the first one (let's name it...
1
3145
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 remote site is trusted. Also, my web site uses a custom HTTPModule implemented in a DLL named Security.dll. Unable to find an entry point named...
4
10114
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 error: "Cannot find server or DNS Error". All static page types open fine (HTM, GIF etc) The confusing thing is - I have allowed Active Server Pages...
2
8865
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 set of predictions that I've been making; I have a table that stores the actual result that occurred each day, and another that stores the predictions...
1
1830
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 www.ourdomain.com/JanetWilson www.ourdomain.com/CarenAnderson All the customers use the same template i.e
5
1180
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 find out what page it is that is causing these problems. How can i find out what pages are executing at the time of the spike? Thanks, kevin goff...
8
10770
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 access the Classic ASP components of the application you are presented with this useless error message: "The system cannot find the file specified" ...
1
5139
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 information : Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'....
17
14661
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 selection. A site offering previews of icons or purchase of a single icon would be nice. Thanks, Brett
6
2688
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 for a particular siteName and returns the siteID. If the siteName is not found then it would create a record and return that record's siteID. I am...
0
7396
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7413
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5323
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3440
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1874
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
700
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.