Cython - Gregf36665/sys_setup GitHub Wiki
Cython Tutorial
Note this requires the professional version of Pycharm for syntax highlighting
Installs
- Create a virtual environment using conda
- Pip install the latest version of cython (0.29.6 as of 20190415)
Microsoft Visual C++ Build Tools
- Download Microsoft Visual C++ Build tools (https://visualstudio.microsoft.com/downloads/?q=build) (Currently 2019 is the latest)
- Select C++ Build Tools only
- This will select 4 additional options, leave all of them selected
- Reboot your computer
Setup tools
- Go to settings -> tools -> external tools
- Select create a new tool
Name: cython
Description: Compile all cython files
Group: External Tools (default)
Program: $PyInterpreterDirectory$\python.exe
Arguments: $FileDir$\setup.py build_ext --inplace --compiler=msvc
Working directory: $FileDir$
Pycharm >=2023
In Pycharm 2023 you can use Run setup.py Task... and select build_ext. You should add --inplace as a command line argument.