Python integration
Python on Windows
On Windows, Python engine (currently 3.6) is preinstalled. CudaText finds files "python3*.dll" in its folder, and uses file with the latest version number. No options are used to configure this.
You can use not only version 3.6. From CudaText's Addon Manager, install appropriate package, e.g. "Windows_Python37_64bit", and restart the program.
Python engine requires Visual C++ Redistributable for Visual Studio 2015 (32-bit or 64-bit, same as CudaText). Download it from Microsoft site.
Note for Windows 7. You also need the Update for Universal C Runtime in Windows (KB2999226). Download it from the Microsoft site.
Python on Linux, BSD, Solaris
Linux/*BSD/Solaris version uses Python library from OS. Install Python 3.x (usually already installed). Instruction, if Python library was not automatically used:
- Open file manager, go to /usr
- Search for "libpython3.so"
Or use the terminal command:
- $ find /usr -name 'libpython3.*so*' 2>/dev/null
- If not found, install Python 3.x, and search again.
- Set option "pyliblinux" ("pylibfreebsd", "pylib__solaris") in the "user.json" config, to one of the found filenames. Write option to the "user.json" or course, not "default.json".
Typical value for Solaris 11.4 x86:
- "pylib__solaris" : "/usr/lib/amd64/libpython3.5m.so",
Python on macOS
On macOS you must install Python 3, from official site python.org. Versions 3.6…3.9 are ok. CudaText will detect this Python. CudaText has option "pylib__mac" with such default value (actual version number is auto-detected):
- "pylib__mac": "/Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib",
If you use "virtualenv" from "conda" with isolated Python, CudaText cannot detect it, so you need to write to the user.json option "pylib__mac" by hands. Example:
- "pylib__mac": "/miniconda2/envs/py3/lib/libpython3.7m.dylib",