Modules... paths... newbie confusion

Steve Holden steve at holdenweb.com
Tue Aug 22 09:32:36 EDT 2006


MrBlueSky wrote:
> Thanks for the suggestions, folks..
> 
> site-packages
> ~~~~~~~~~~
> OK, I'm been trying to get MSSQL into c:\Python24\lib\site-packages.
> MSSQL comes (as a tar'd, zip'd file) with a folder hierarchy with
> MSSQL.py at the top level and then bin\python2.3\mssqldb.pyd.   If I
> try and copy this folder hierarchy into site-packages and "import
> MSSQL" then it recognises MSSQL.py but fails to import mssqldb, as
> that's imported from MSSQL.py.
> 
> I've noticed a setup.py in the MSSQL folder, but it looks like it has
> odd hard-coded paths in it (D:\...) and anyway when I tried to run it,
> I found the Usage message less than helpful!
> 
> I really apologise if this is Bleeding Obvious to everyone else - is
> there a web page that will explain all this so the lightbulb will go on
> over my head?!
> 
It's usually considered acceptable to tweak the setup.py file if it has 
to know where specific things like libraries exist on your machine. 
Usually the file will be setup up to find them in the most obvious 
places (so I don't know what D:... paths are doing in there).

In other words, it's OK to fix setup.py so it runs!

You won;t get MySQLdb to run without running the setup.py since IIRC 
there's a compile step for a C library (and it's that compile step that 
needs to be able to find the MySQL client libraries).

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list