Install and test Python, Virtualenv and Virtualenv-wrappers on your machine. We suggest to work with Python 3.8 or higher versions.
Here, we report minimal instructions. See this guide for details.
Open your terminal and first check which Python version is installed on your machine:
python --version
python3 --versionIf the version does not match the requirements, run the following command:
sudo apt-get update
sudo apt-get install python3.8 python3-pipor
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.8 python3-pipAfter the installation, you should be able to open a Python shell:
~/veos_digital/repos/mpm_space_sciences/python3
Python 3.9.1 (default, Dec 10 2020, 11:11:14)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Exit by pressing Ctrl + D
Open your terminal and first check which Python version is installed on your machine:
python --version
python3 --versionIf the version does not match the requirements, first install Homebrew by following these instructions. Then, update homebrew by running:
brew update && brew upgradeFinally, install Python:
brew install python3After the installation, you should be able to open a Python shell:
~/veos_digital/repos/mpm_space_sciences/python3
Python 3.9.1 (default, Dec 10 2020, 11:11:14)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Open PwerShell, then check which Python version is installed on your machine:
python --versionIf the version does not match the requirements, open the Microsoft Store app, search for Python and choose the highest version available.
You can install Virtualenv through pip:
sudo pip3 install virtualenv You can now create a virtualenv running:
virtualenv venv_name or specifying a Python interpreter, e.g.,
virtualenv -p /usr/bin/python3 venv_name
You can now activate the virtual environment by running:
source venv_name/bin/activaterun deactivate to exit the virtual environment.
Run
sudo pip install virtualenvwrapperThen, on Mac OS, Ubuntu, and Mint add to your shell startup file (.bashrc, .profile) the following lines:
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.shSave, exit, and reload the startup file, e.g.,
source ~/.bashrcNow try creating a virtual environment by running:
mkvirtualenv --python=python3 mpm_space_sciences Install virtualenvwrapper-win and follow the instruction on the website.
Thereafter, try creating a virtual environment by running:
mkvirtualenv --python=python3 mpm_space_sciences You can use your preferred editor. If you do not have one we suggest Visual Studio.
After successfully installing Python and Virtualenv,
-
let us create a virtual environment called mpm_space_sciences. Follow the instructions above, if you do not know how to do it.
-
Clone this repository:
git clone ...
-
Install it:
cd mpm_space_sciences pip install -e ./Where
./means that pip will use the./setup.pyscript to install the packagge, and the-eoption allows you to modify the source code of the package you installed.