Open opazSG opened 8 years ago
Thanks @opazSG I will test it later today when I can get a hold of a window machine.
Sorry @kitchoi to make you work on Windows for a while... ;) Please let me know if you find any problems.
After manually downloading the numpy wheel and pip install it, I was able to install simphony
and simphony-nfluid
but not simphony-ncad
because I do not have the ncad library required. Where can a user get the .dll
?
g++: error: C:\NCad\libNCad.dll: No such file or directory
error: command 'C:\\MinGW\\bin\\g++.exe' failed with exit status 1
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\kit\\appdata\\local\\temp\\pip-build-w9a_zc\\simphony-ncad\\setup.py';ex
ec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'
), __file__, 'exec'))" install --record c:\users\kit\appdata\local\temp\pip-0zrr
qa-record\install-record.txt --single-version-externally-managed --compile" fail
ed with error code 1 in c:\users\kit\appdata\local\temp\pip-build-w9a_zc\simphon
y-ncad
Kit,
nCAD.dll cannot be freely distributed. GitHub is an open source repository and GitHub SimPhoNy project is completely open and consequently nCAD cannot be distributed by this tool. Anyway, according to the Consortium Agreement you (Enthought) is authorized to use nCAD in the project framework. If you are interested, please send me an email (groman@sgenia.com) and I will indicate you the steps to get nCAD.dll
Thanks
Guillermo
Guillermo Román-Pérez
Jefe de Proyecto
Project Manager
cid:image003.jpg@01CCFD3C.C9D7A600
C/ Chile, 4 Edificio II – 2ª Pta
28230 – Las Rozas Madrid
Email: mailto:groman@sgenia.com groman@sgenia.com
Telephone: +34 916306388
Fax: +34 916306406
De: Kit Yan Choi [mailto:notifications@github.com] Enviado el: jueves, 03 de marzo de 2016 12:59 Para: simphony/simphony-framework Asunto: Re: [simphony-framework] Added Windows batch script and installation instructions (#67)
After manually downloading the numpy wheel and pip install it, I was able to install simphony and simphony-nfluid but not simphony-ncad because I do not have the ncad library required. Where can a user get the .dll ?
g++: error: C:\NCad\libNCad.dll: No such file or directory
error: command 'C:\\MinGW\\bin\\g++.exe' failed with exit status 1
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\ \users\kit\appdata\local\temp\pip-build-w9a_zc\simphony-ncad\setup.py';ex ec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n' ), file, 'exec'))" install --record c:\users\kit\appdata\local\temp\pip-0zrr qa-record\install-record.txt --single-version-externally-managed --compile" fail ed with error code 1 in c:\users\kit\appdata\local\temp\pip-build-w9a_zc\simphon y-ncad
— Reply to this email directly or view it on GitHub https://github.com/simphony/simphony-framework/pull/67#issuecomment-191725466 . https://github.com/notifications/beacon/AIkf3C8alkqK3IjEwzHAya3tFGRPL_EEks5pps0WgaJpZM4Hjtja.gif
No se encontraron virus en este mensaje. Comprobado por AVG - www.avg.com Versión: 2016.0.7442 / Base de datos de virus: 4537/11738 - Fecha de publicación: 03/03/16
To install numpy using pip on windows you need to have a compile enviroment for windows. To do things right you need the native visual studio compilers that python was build with (Please please please do not use msys dev or mingw). https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
It is also common to provide the whl files in a easily available link. One can add binary files to the github release tags. These files can be downloaded by an automated script. However, this is only a workaround and might not work on all windows setups. The best solution is to have the compilers setup
I would also not use gohlke binaries on an automated script without permission.
OK, we could rely on the manual installation of numpy
by the Windows user, as we are providing the user the necessary info at Step 6 of the notes.
I am happy to strip the numpy
target that automates this step out of the MakeWin
batch script if it is not helpful. Please let me know.
So the libNCad.dll
requires mingw32
being the compiler. However, the user might want to use a different compiler for other python packages. Can the compiler be defined and applied in an isolated python environment?
I guess the compiler can always be defined by the user, by editing the corresponding distutils.cfg
file within such Python environment. Besides simphony-nCAD
requiring of the libNCad.dll
library to run, the full nCAD software needs Qt for Windows, which is provided precompiled with either MinGW or Visual Studio. The thing about MinGW is that it is an open-source alternative, therefore available to most users.
(Perhaps @SGGgarcia, who has more experience with MinGW than myself, can comment a bit more on its advantages).
The thing about MinGW is that it is an open-source alternative, therefore available to most users.
The MSVC 2008 compiler used to build python 2.7 is also available for free (https://github.com/cython/cython/wiki/CythonExtensionsOnWindows#using-microsoft-visual-c-compiler-for-python-only-for-python-27x)
@kitchoi @itziakos Thanks for your comments, the thing with MinGW and MSVC is that nCad itself is compiled with MinGW and potentially it will be a big amount of work to compile it with MSVC at this point. For the moment we haven't found any failures or runtime problems with this, but I understand why it could be dangerous. Having said that, we didnt find any other solution than configuring the disutils.cfg file for using MingGW instead of MSVC.
Thanks @SGGgarcia.
I understand that we cannot change the build strategy for nCad. We just need to make sure that the danger is documented and users are informed about it.
Having said that, we didnt find any other solution than configuring the disutils.cfg file for using MingGW instead of MSVC.
it is possible to define the compiler and other options to be used at the command line:
python setup.py build_ext --compiler=mingw32
python setup.py install
The commands above (or something similar) will use mingw only for building the n-Fluid extension and does not change the global distutils.cfg.
@itziakos I see, that makes sense, I will try and let you know about the results
@itziakos update: I tried this and had no problems, so I will update the installation instructions, thanks again, that was useful
The following SimPhoNy packages can be installed on Windows using the included
MakeWin.bat
script file:simphony-common
simphony-nCAD
nfluid