Closed jennirinker closed 7 years ago
I don't want to install proprietary software. if you install the toolchains for MS 2017, you have vcvarsall.bat and cl.exe and all the functions that are required to run Cython, but I think msvc9compiler.py doesn't look in the correct places (probably because it's VS 2017).
'Free' here does not mean 'not proprietary'. A term commonly used to explain this is "free as in beer not as in free speech."
If you want to use cython
avoiding as much proprietary software as possible (on Windows
) you can achieve that from the Anaconda Prompt
with the following:
conda install libpython m2w64-toolchain cython
echo [build] > %CONDA_PREFIX%\Lib\distutils\distutils.cfg
echo compiler = mingw32 >> %CONDA_PREFIX%\Lib\distutils\distutils.cfg
If you are just trying to avoid paying for Visual Studio 2015
then you should be able to use this link: http://landinghub.visualstudio.com/visual-cpp-build-tools
Touche. I know the difference between free and proprietary, and I should have been more accurate in my statement.
Also, you are a wonderful human being. After days messing around with different compiler installations, your link to the visual cpp build tools has fixed my issue with Cython. Thank you so much.
Since Cython now works for me, I'm going to close the issue.
The link above does not work anymore. What is the current suggested link to install the free-as-in-beer MS compiler on windows 7+ to be used with current Anaconda?
ping @mingwandroid
Full blown Visual Studio is free as in beer for many uses.
It's maybe just me, but I can't find the link to Visual Studio 2015 community.
EDIT: I probably found it after creating a MS account and joining the DevEssential program (whatever that means):
VS2017 might work ok-ish.
.. for Python 3.7 and C stuff I expect it will anyway.
@tritemio We made a repo/documentation set with detailed instructions for setting up compilers on Windows (both f2py and cython). Got tired of re-inventing the wheel.
Documentation: https://python-at-risoe.pages.windenergy.dtu.dk/compiling-on-windows/ Repo: https://gitlab.windenergy.dtu.dk/python-at-risoe/compiling-on-windows
Sorry the repo is on GitLab -- organizational decisions above my head.
Hopefully it works for you.
Steps to reproduce:
conda install cython
python setup.py build_ext --inplace
I know this is related to the Visual Studio C compilers. My version of python was compiled using MSC v.1900 (Visual Studio 2015, a.k.a. v14), but I don't have VS 2015 installed and I don't want to install proprietary software. This page notes that VS 2015 has a "full-featured community edition", but that link now leads to VS 2017. And if you install the toolchains for MS 2017, you have vcvarsall.bat and cl.exe and all the functions that are required to run Cython, but I think msvc9compiler.py doesn't look in the correct places (probably because it's VS 2017).
Any advice on getting Cython to run on Windows with VS 2017 is appreciated.