-
Notifications
You must be signed in to change notification settings - Fork 0
Cython
Greg Flynn edited this page Feb 10, 2023
·
5 revisions
Note this requires the professional version of Pycharm for syntax highlighting
- Create a virtual environment using conda
- Pip install the latest version of cython (0.29.6 as of 20190415)
- 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
- 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$
In Pycharm 2023 you can use Run setup.py Task... and select build_ext. You should add --inplace as a command line argument.