This guide will help you to install and launch script pain.py
All commands below should be run in Terminal
To open Terminal on macOS you can follow one of instructions below:
- Open Launchpad from your Dock with the keyboard shortcut F4, or tap the six-square-icon button on the Touch Bar.
Find the Utilities folder and click it. Choose Terminal. - In the Finder: open the Applications folder
Usually you can find the icon of the folder on the left in the Finder window.
Find in Applications folder Utilities and open it. Then click on Terminal there.
System version: ≤ 10.8 macOS
Python version: ≤ 3.10
To launch the script you should have Python of version 3.10 or higher. Check current version of python on your computer by running the command:
python --version
This message means python is not installed:
python --version: command not found
You can download the latest version of Python from official site: Link to download
To download script and required for installation files run the commands:
git clone https://github.com/vladissta/Virtual_environment_research
cd Virtual_environment_research
After downloading, it would be better to create new virtual environment, where you will work with script.
You can create virtual environment right in the directory with script or in another directory.
To create virtual environment named venv in current directory (with script) using the venv module in Python run:
python -m venv venv
After that you should activate virtual environment:
source venv/bin/activate
You will no longer need to create new virtual environment, but you should always activate this virtual environment before working with script.
Also, you can specify the path to and name of virtual environment if you want to:
python -m venv path/name_of_venv
source path/name_of_venv/bin/activate
Script works with several packages, that should be installed in yor virtual environment before launching the script.
File requirements.txt contains the list of required versions of packages needed to script work correctly.
To install this packages run:
pip install --ignore-requires-python -r requirements.txt
Finally, script can be launched from current directory by command in terminal:
python pain.py
To deactivate virtual environment after finishing work with script :
deactivate
If you want to work with script again in the future, you will need to follow a few steps:
cd path/Virtual_environment_research
Where path
is directory where you downloaded files including the script
source venv/bin/activate
or if you specified name of and path to environment:
source path/name_of_venv/bin/activate
To launch the script
python pain.py
deactivate