Installing Standard Python
Standard python.exe installs from https://www.python.org/downloads/windows/. Pynapse works best with Python 3.7.
Note
We recommend installing 64-bit Python on 64-bit Windows 10. This is the Python 3.7.x "Windows x86-64 executable installer" option. The latest available version of 3.7.x is 3.7.9.
On 32-bit machines, install the Python 3.7.x "Windows x86 executable installer".
-
During installation, select 'Customize Installation'
-
Select 'Install for All Users' and 'Add Python to environment variables'
-
Change the installation directory to C:\Python3
-
Environments
A Python virtual environment is a self-contained directory tree that contains a Python installation for a particular version of Python, plus a number of additional packages. The default environment is called 'base'.
Environments are simply directories on disk, so it is easy to delete/recreate environments if they get in a bad state. It is more difficult to do this with the 'base' environment. It is therefore recommended that you create a specific environment for Pynapse to use.
Environments are created in standard python.exe installation with the venv module.
From the command line:
python -m venv C:\Python3\envs\pynapse
To install pip packages from the command line (Start → cmd), you first activate the environment. Pynapse requires a few packages with specific versions (see https://github.com/ipython/ipykernel/issues/358 and https://github.com/ipython/ipykernel/issues/518 for more information).
C:\Python3\envs\pynapse\Scripts\activate.bat
pip install ipykernel==4.10.0 pyzmq==19.0.1 jedi==0.17.0 ipython_genutils==0.2.0
The tdt package is useful for offline data analysis:
pip install tdt
Pynapse Setup
-
In Synapse, add the Python Coding Gizmo from the Specialized gizmo list.
-
In Pynapse General Tab, set the Python Install Directory to your installed Python environment, which in this case is:
C:\Python3\envs\pynapse\Scripts\python.exe
-
In Synapse, go to Menu → Preferences. The Python Directory will have updated to the path you just used. Select 'Lock' so this path is the default path whenever you use a Pynapse gizmo.