Skip to content

Commit 706ffdf

Browse files
committed
Separated python commands for Windows and macOS
1 parent 8adcf67 commit 706ffdf

File tree

1 file changed

+62
-11
lines changed

1 file changed

+62
-11
lines changed

README.md

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To open Command Prompt press the key combination Windows + R to open a Run dialo
3232
It is recommended that the path of Python Interpreter is added for easy usage. There are two ways to add Python to Windows PATH.
3333

3434
1. During Python installation check the box Add Python to PATH when prompted.
35-
- Confirm Python PATH is set in **Command Prompt** by typing `python3 --version` to verify the Python version
35+
- Confirm Python PATH is set in **Command Prompt** by typing `py --version` to verify the Python version
3636

3737
2. Manually add Python to Windows Path:
3838
- Press the key combination **Windows + R** to open a Run dialog
@@ -46,7 +46,7 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
4646
- Navigate to the **scripts** folder (this is the `Python Scripts path`)
4747
- Set the Path **Variable value** to `Python application path;Python Scripts path` (paths are separated by a semicolon)
4848
- Press **OK**
49-
- Confirm Python PATH is set in **Command Prompt** by typing `python3 --version` to verify the Python version
49+
- Confirm Python PATH is set in **Command Prompt** by typing `py --version` to verify the Python version
5050

5151
#### Mac OS X Setup
5252

@@ -67,7 +67,12 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
6767
### IDEs
6868

6969
#### Visual Studio Code and Using a Virtual Environment
70-
To run these sequences a light-weight IDE, or to target cross-platform development, use the free [Visual Studio Code](https://code.visualstudio.com/). See [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial) to simply setup your IDE with Python. Optionally, using a [virtual environment](https://docs.python.org/3/tutorial/venv.html) is recommended to successfully meet the installation requirements to run these sequences. Using the commands `python3 -m venv .venv` followed by `.venv\scripts\activate` is a simple way to setup your virtual environment. After your IDE and virtual environment is setup, continue to install the remaining Python packages below.
70+
To run these sequences a light-weight IDE, or to target cross-platform development, use the free [Visual Studio Code](https://code.visualstudio.com/). See [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial) to simply setup your IDE with Python. Optionally, using a [virtual environment](https://docs.python.org/3/tutorial/venv.html) is recommended to successfully meet the installation requirements to run these sequences. To setup your virtual environment run the follow commands and then continue to install the remaining Python packages later in this document:
71+
72+
| OS | Command |
73+
| - | - |
74+
| Windows | `py -m venv .venv` followed by `.venv\scripts\activate` |
75+
| macOS | `python3 -m venv .venv` followed by `.venv\scripts\activate` |
7176

7277
#### Visual Studio Community
7378
To run these sequences in a more feature rich IDE, use the free [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/). See [Python In Visual Studio](https://docs.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-00-installation?view=vs-2022) to simply setup your IDE with Python. Optionall, using a [virtual environment](https://docs.microsoft.com/en-us/visualstudio/python/managing-python-environments-in-visual-studio?view=vs-2022) is recommended to successfully meet the installation requirements to run these sequences.
@@ -76,31 +81,77 @@ To run these sequences in a more feature rich IDE, use the free [Visual Studio C
7681

7782
#### Managing Packages
7883
##### How to Install/Upgraded Packages
79-
Installing packages use pip. It is recommended that pip be updated to latest version `python3 -m pip install --upgrade pip`
84+
Installing packages use pip. It is recommended that pip be updated to latest version.
85+
86+
To install/upgrade pip, run command:
87+
| OS | Command |
88+
| - | - |
89+
| Windows | `py -m pip install --upgrade pip` |
90+
| macOS | `python3 -m pip install --upgrade pip` |
8091

81-
The version of pip can be displayed with the following command `pip3 -V`
92+
To display the version of pip, run command:
93+
| OS | Command |
94+
| - | - |
95+
| Windows | `pip -V` |
96+
| macOS | `pip3 -V` |
8297

8398
##### How to View All Installed Packages
84-
A list of all installed packages can be found with `pip3 freeze` command
99+
A list of all installed packages can be displayed.
100+
101+
To view all installed packages, run command:
102+
| OS | Command |
103+
| - | - |
104+
| Windows | `pip freeze` |
105+
| macOS | `pip3 freeze` |
85106

86107
##### How to View Details of an Installed Package
87-
After a package is installed the details of a package can be displayed with the following command `pip3 show <package name>` (e.g. `pip3 show spikesafe-python`)
108+
After a package is installed the details of a package can be displayed.
109+
110+
To view details of a package, run command:
111+
| OS | Command |
112+
| - | - |
113+
| Windows | `pip show <package name>` |
114+
| macOS | `pip3 show <package name>` |
88115

89116
##### Installing spikesafe-python Package
90-
The [spikesafe-python](https://pypi.org/project/spikesafe-python/) library will need to be installed using the command `python3 -m pip install spikesafe-python`. Vektrex recommends always having the latest version of spikesafe-python when running these sequences; the current version is 1.2.3.
117+
The [spikesafe-python](https://pypi.org/project/spikesafe-python/) library will need to be installed. Vektrex recommends always having the latest version of spikesafe-python when running these sequences; the current version is 1.3.0.
118+
119+
To install this package, run command:
120+
| OS | Command |
121+
| - | - |
122+
| Windows | `py -m pip install spikesafe-python` |
123+
| macOS | `python3 -m pip install spikesafe-python` |
91124

92125
Once the spikesafe-python package is installed, each script in this repository can be run independently as a standalone Python file. Run a file in its current state and verify that the expected outputs are obtained, as specified by the file's markdown description.
93126

94127
Complete class documentation is available for spikesafe-python in [spikesafe-python API Overview](spikesafe_python_lib_docs).
95128

96129
#### Installing matplotlib Package
97-
Some sequences involve graphing measurement results. To properly graph results, the [matplotlib](https://matplotlib.org/) library is required (version 3.2.1 or greater). Use the command `python3 -m pip install matplotlib` to install the latest version of matplotlib. Once the matplotlib library is installed, each sequence that involves graphing can be run as a standalone Python file.
130+
Some sequences involve graphing measurement results. To properly graph results, the [matplotlib](https://matplotlib.org/) library is required (version 3.2.1 or greater). Once the matplotlib library is installed, each sequence that involves graphing can be run as a standalone Python file.
131+
132+
To install this package, run command:
133+
| OS | Command |
134+
| - | - |
135+
| Windows | `py -m pip install matplotlib` |
136+
| macOS | `python3 -m pip install matplotlib` |
98137

99138
#### Installing PyCLibrary Package
100-
Some sequences require external C resources, and requires the [PyCLibrary](https://pyclibrary.readthedocs.io/en/latest/) library. To install this library, enter the command `python3 -m pip install pyclibrary`. Once the PyCLibrary library is installed, each sequence that involves external C resources can be run as a standalone Python file.
139+
Some sequences require external C resources, and requires the [PyCLibrary](https://pyclibrary.readthedocs.io/en/latest/) library. Once the PyCLibrary library is installed, each sequence that involves external C resources can be run as a standalone Python file.
140+
141+
To install this package, run command:
142+
| OS | Command |
143+
| - | - |
144+
| Windows | `py -m pip install pyclibrary` |
145+
| macOS | `python3 -m pip install pyclibrary` |
101146

102147
#### Installing pyserial Package
103-
Some sequences involve connecting to a serial interface instrument and requires the [pyserial](https://pypi.org/project/pyserial/) library (version 3.5 or greater). Use the command `python3 -m pip install pyserial` to install the latest version of pyserial. Once the pyserial library is installed, each sequence that involves a serial interface can be run as a standalone Python file.
148+
Some sequences involve connecting to a serial interface instrument and requires the [pyserial](https://pypi.org/project/pyserial/) library (version 3.5 or greater). Once the pyserial library is installed, each sequence that involves a serial interface can be run as a standalone Python file.
149+
150+
To install this package, run command:
151+
| OS | Command |
152+
| - | - |
153+
| Windows | `py -m pip install pyserial` |
154+
| macOS | `python3 -m pip install pyserial` |
104155

105156
### General Usage
106157
For most examples, you may need to modify the specified IP address within a sequence to match the IP address that is physically set on your SpikeSafe's DIP switch. In each sequence, the default IP address of 10.0.0.220 is set in the line `ip_address = '10.0.0.220'`.

0 commit comments

Comments
 (0)