Re: [PyMOL] Adding python modules

2007-03-10 Thread DeVill

2007/3/10, DeVill devillmeis...@gmail.com:


 Have you tried re-setting sys.argv before running setup (aka
 sys.argv=['setup.py','--build'] ; run setup.py,local )?  If I'm
 understanding the help for the pymol run command correctly, you'd want
 to
 use either local or module (so that the global namespace doesn't confuse
 things).


Now that finaly got me closer to the solution! :-) This way I could start
the setup.py installation. Thx!

But now I'm facing another problem:

PyMOLsys.argv=['setup.py','build']
PyMOLrun setup.py, local
running build
running build_py
copying MySQLdb\release.py - build\lib.win32-2.4\MySQLdb
running build_ext
Traceback (most recent call last):
  File C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parser.py,
line 291, in parse
parsing.run_file(exp_path(args[nest][0]),pymol_names,{})
  File C:\Program Files\DeLano
Scientific\PyMOL/modules\pymol\parsing.py, line 407, in run_file
execfile(file,global_ns,local_ns)
  File  setup.py, line 19, in ?
setup(**metadata)
  File C:\Program Files\DeLano
Scientific\PyMOL\py24\lib\distutils\core.py, line 166, in setup
raise SystemExit, error:  + str(msg)
SystemExit: error: The .NET Framework SDK needs to be installed before
building extensions for Python.

Where should I install the .NET Framework?

Bye
DeVill

P.S.: sorry for the previous empty E-mail... my client mesd things up a
bit :-*






Hi!

Finaly I succesfully installed the .NET framework, the Platform SDK, and so
on... a lot o stuff indeed!

Now I get another error message saying:

running build
running build_py
copying MySQLdb\release.py - build\lib.win32-2.4\MySQLdb
running build_ext
building '_mysql' extension
C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe /c /nologo /Ox /MD
/W3 /GX /DNDEBUG -Dversion_info=(1,2,2,'final',0)
-D__version__=1.2.2-IC:\Program Files\MySQL\MySQL Server
5.0\include -IC:\Program Files\DeLano Scientific\PyMOL\py24\include
-IC:\Program Files\DeLano Scientific\PyMOL\py24\PC /Tc_mysql.c
/Fobuild\temp.win32-2.4\Release\_mysql.obj /Zl
Traceback (most recent call last):
 File C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parser.py,
line 291, in parse
   parsing.run_file(exp_path(args[nest][0]),pymol_names,{})
 File C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parsing.py,
line 407, in run_file
   execfile(file,global_ns,local_ns)
 File setup.py, line 19, in ?
   setup(**metadata)
 File C:\Program Files\DeLano
Scientific\PyMOL\py24\lib\distutils\core.py, line 166, in setup
   raise SystemExit, error:  + str(msg)
SystemExit: error: command 'C:\Program Files\Microsoft Visual Studio
8\VC\bin\cl.exe' failed with exit status 2

Then I tried to run the compiler in a command prompt:

C:\Program Files\DeLano Scientific\PyMOL\MySQLsetupcl.exe /c /nologo /Ox
/MD /W
3 /GX /DNDEBUG -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2-IC:\Progra
m Files\MySQL\MySQL Server 5.0\include -IC:\Program Files\DeLano
Scientific\Py
MOL\py24\include -IC:\Program Files\DeLano Scientific\PyMOL\py24\PC
/Tc_mysql
.c /Fobuild\temp.win32-2.4\Release\_mysql.obj /Zl
cl : Command line warning D9035 : option 'GX' has been deprecated and will
be re
moved in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
_mysql.c
C:\Program Files\DeLano Scientific\PyMOL\py24\include\Python.h(18) : fatal
error
C1083: Cannot open include file: 'limits.h': No such file or directory


Then I added the  include dir of Visual Studio into the command line, and:


_mysql.c
C:\Program Files\DeLano Scientific\PyMOL\py24\include\Python.h(41) : fatal
error
C1083: Cannot open include file: 'unistd.h': No such file or directory

Now I don't have the faintest idea, where should I get unistd.h from... what
it is after all?

Dose anyone have any ideas?

Bye
DeVill


Re: [PyMOL] Adding python modules

2007-03-10 Thread Peter Adrian Meyer
 Finaly I succesfully installed the .NET framework, the Platform SDK, and so
 on... a lot o stuff indeed!

I'm not clear on why you'd need the .NET framework (pymol/python stuff is
generally compiled to machine code, not CLR bytecode).  One thing to check
is that you're using the correct compiler (MS has a dialect of c++ that
compiles to CLR bytecode which would probably not work so well as a python
module).

[snip]

 _mysql.c
 C:\Program Files\DeLano Scientific\PyMOL\py24\include\Python.h(41) :
fatal
 error
  C1083: Cannot open include file: 'unistd.h': No such file or directory

 Now I don't have the faintest idea, where should I get unistd.h from...
what
 it is after all?

As far as I know, unistd.h is a POSIX (unix) header file.  I don't know
this is available on windows natively (I believe some versions of windows
are supposed to be POSIX compliant, but I'm not sure how compilant they
are); possibly the pre-processer definations are not being set correctly.

I'd recommend either installing mingw or cywin at this point, and
compiling pymol from source, then using the same compilers to build the
mysql module.  Actually, I'd recommend switching to linux or another unix
varient (OS X, one of the bsd's, etc); but that may be more trouble than
you're willing to go to for this problem.  But possibly someone with more
experience in windows programming than I am has a better suggestion.

Good luck,

Pete


Pete Meyer
Fu Lab
BMCB grad student
Cornell University