dimchris / mdanalysis

Automatically exported from code.google.com/p/mdanalysis
0 stars 0 forks source link

Windows 7 64-bit python 2.7.3 install #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hey all, I'm trying to install MDAnalysis 0.7.5.1 onto a laptop running 64-bit 
Windows 7 using MinGW's c++ compiler and am not having much luck. I'm unable to 
use cygwin because it doesn't support 64-bit at the moment, and the trouble 
with installing seems to be arising during the building of 
coordinates._dcdmodule. The output I get is:
C:\Users\Jacob Wilson\Desktop\MDAnalysis-0.7.5.1> python .\setup.py build
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution 
option: 'install_requires'
  warnings.warn(msg)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution 
option: 'tests_require'
  warnings.warn(msg)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution 
option: 'extras_require'
  warnings.warn(msg)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution 
option: 'zip_safe'
  warnings.warn(msg)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution 
option: 'test_suite'
  warnings.warn(msg)
running install
running build
running build_py
running build_ext
building 'coordinates._dcdmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall 
-IC:\Python27\lib\site-packages\numpy\core\include -Isrc/dcd/include 
-IC:\Python27\include -IC:\Python27\PC -c src/dcd/dcd
.c -o build\temp.win32-2.7\Release\src\dcd\dcd.o
python.exe : cc1.exe: error: unrecognized command line option '-mno-cygwin'

I've tried to find where the compiler options are, but can't find them. If 
anyone could provide any insight, it would be greatly appreciated

Original issue reported on code.google.com by jacob.wi...@gmail.com on 21 May 2012 at 7:18

GoogleCodeExporter commented 9 years ago
Hi Jacob,

> Hey all, I'm trying to install MDAnalysis 0.7.5.1 onto a laptop running 
64-bit Windows 7 using MinGW's c++ compiler and am not having much luck. I'm 
unable to use cygwin because it doesn't support 64-bit at the moment, and the 
trouble with installing seems to be arising during the building of 
coordinates._dcdmodule.

[most output from python .\setup.py build snipped, see Issue 108]

> building 'coordinates._dcdmodule' extension
> C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall 
-IC:\Python27\lib\site-packages\numpy\core\include -Isrc/dcd/include 
-IC:\Python27\include -IC:\Python27\PC -c src/dcd/dcd
.c -o build\temp.win32-2.7\Release\src\dcd\dcd.o
> python.exe : cc1.exe: error: unrecognized command line option '-mno-cygwin'
> 
> I've tried to find where the compiler options are, but can't find them. If 
anyone could provide any insight, it would be greatly appreciated

With this specific question you might have better luck asking on the MDAnalysis 
mailing list, https://groups.google.com/forum/#!forum/mdnalysis-discussion. 
None of the developers have used MDAnalysis on Windows so there's no known 
recipe for getting it to work on that platform.

What you describe seems to be a general problem with building Python packages 
under cygwin. Maybe the Enthought Python Distribution 
http://www.enthought.com/products/epd.php has solved this problem, or any of 
the hints at http://docs.python.org/using/windows.html help?

I am re-labeling this issue an enhancement request but I have to admit that 
unless anyone else comes up with a solution this will likely not be solved any 
time soon.

Best,
Oliver

Original comment by orbeckst on 21 May 2012 at 7:48

GoogleCodeExporter commented 9 years ago
This is a distutils mingw bug. Take a look at this thread on bugs.python.org: 
http://bugs.python.org/issue12641

You can fix it your local installation by opening the 
lib/python2.7/distutils/cygwinccompiler.py file and removing any references to 
"-mno-cygwin". There are some other details on S.O. 
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produ
ces-gcc-error-unrecognized-command-line-o/6035864#6035864

Original comment by rmcgibbo@gmail.com on 6 Aug 2013 at 7:16

GoogleCodeExporter commented 9 years ago
(closed because apparently bug in mingw/distutils)

Original comment by orbeckst on 20 Jan 2015 at 4:53