Installing Anaconda Python
Anaconda installs from https://docs.anaconda.com/anaconda/install/windows/
Note
We recommend installing 64-bit Python on 64-bit Windows 10. This is the Python 3.x "64-Bit Graphical Installer" option.
On 32-bit machines, install the Python 3.x "32-Bit Graphical Installer".
-
During installation:
-
Select 'Install for All Users'
-
Change the installation directory to C:\Anaconda3
-
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 Anaconda using an Anaconda Prompt. Note that you can specify the Python version for each environment as well.
Here's how to create a Python 3.7 environment to use in Pynapse:
-
In Windows, go to Start → "Anaconda Prompt (Anaconda3)". This starts you in the
base
environment. -
If you installed Anaconda 3.8 or higher, then the
base
environment needs to be modified to support Pynapse environment integration.- Type this in the command prompt:
pip install ipykernel==4.10.0 pyzmq==19.0.1 jedi==0.17.0
- Type this in the command prompt:
-
Type this to create the Python 3.7 environment called 'pynapse':
conda create --name pynapse python=3.7 ipykernel=4.10.0 pyzmq=19.0.1 jedi=0.17.0
-
The fresh environment is mostly empty, so you'll want to add common packages. From the Anaconda Prompt, first type this to activate the new environment:
conda activate pynapse
-
Then install some of the libraries we'll want to use. For example, install the tdt package for data analysis:
pip install tdt
Important
Anytime you want to add packages to an environment, do it through the Anaconda Prompt and activate your environment first.
-
If you want to add your own custom runtime plotting to Pynapse, create the environment with this:
pip install matplotlib
Pynapse Setup
-
In Synapse, go to Menu → Preferences and set the Python Directory to
C:\Anaconda3
-
Add a Python Coding Gizmo from the Specialized gizmo list.
-
The Pynapse General Tab has a drop down that shows the environments created in Anaconda, so you can choose the environment directly in the GUI. Click the refresh button and choose the
pynapse
environment we just created. Commit the change. -
In Synapse, go to Menu → Preferences. The Python Directory and Environment will have updated to the path you just used. Select 'Lock' so this path and environment are the defaults whenever you use a Pynapse gizmo.