Closed bjodah closed 7 years ago
On OSX, to fix the linking, do export LDFLAGS="-Wl,-rpath,/Users/user/miniconda3/envs/codegen17/lib/"
before doing the compilation.
On Windows, if you are using mingw, you'll need to patch python.dll to make it work with both msvc and mingw. We do this for symengine in appveyor. Let me know if you want to go ahead with mingw and I can help.
@asmeurer I'm running into this bug under windows using Anaconda3 when trying to use mingw: https://bugs.python.org/issue21821
Is there a way under conda to have our environment.yml
e.g. patch distutils/cygwincompiler.py
?
mingw under Anaconda2 now actually works if I make sure python27.dll
is available in library_dirs
. Linking against sundials however still generates lots of errors (when using mingw, not msvc).
@bjodah, if it helps, see https://github.com/conda-forge/rpy2-feedstock/blob/master/recipe/bld.bat and meta.yaml for a windows build of a python extension.
@isuruf thank you for the link! I'm currently using pyximport with a custom pyxbld file to build the code generated in the notebooks. But maybe we should turn this into a conda package, I don't now. Windows users could run a .bat
file which sets up those files (patched dll's etc.) after creating the conda environment.
Yes, a conda package is probably the most robust and usable solution.
Thanks for all the input. The notebooks are rendering on all 3 platforms (with system provided compilers).
So I have got my first preliminary notebooks to compile on all systems (see below for details, OS X still needs some fixing).
The notebooks are still quite rough (I need to rephrase texts, fix misspellings & reformat them into exercises of some sort).
Do you think we should configure CI services for all platforms? (I am not familiar with appveyor, nor OSX on travis)
Ubuntu
Using Python 3 with local (pip) environment on Ubuntu 16.04:
Using Anaconda2 on a fresh install of Ubuntu 16.04:
OS X
Using Anaconda3 on OS X El Capitan:
Windows
Using Anaconda2 on Windows 10 (no msvc installed):
using mingw give linking errors when linking against sundials (a bunch of missing symbols)
if I instead follow the link and download and installed
VCForPython27.msi
(weighing in at 86 MiB). I then restarted the system (maybe logging on/off is enough), and then every thing worked fine.Using Anaconda3 on Windows 10:
Downloading Visual C++ Build Tools 2015 from the above link (beware: it's a 4 GiB installation -- and one may not skip the Windows 8.1 SDK or headers will be missing) and restarting the system allows the notebooks to be run successfully.
If that is an unacceptable requirement I suppose we could look into building sundials using mingw (but the linker were spitting out tons of errors mentioning python related missing symbols).