How to install magnopy#
Requirement for magnopy installation are:
Python (>=3.9)
And several libraries:
# Package dependencies
numpy
matplotlib
wulfric==0.5.4
Magnopy can be installed with pip or from source.
Do you have Python?#
Most likely Python is already installed on your machine (if not check these links: Python installation). One of the ways to check if you have python installed is to run the command in your terminal
python
If you see something like
Python 3.10.9 (main, Dec 15 2022, 18:25:35) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
then you have it.
In most cases python command launches python3, however if it launches python2, then
you may need to use python3 instead (and pip3 instead of pip).
Hint
Use exit() or press ctrl+D to close python console.
Hint
On linux and OSX systems one can create a virtual environment for the magnopy's installation with
(use your version of python instead of python3.13 if needed)
python3.13 -m venv .venv
And activate it with
source .venv/bin/activate
Installation with pip#
Magnopy is published and distributed from the Python package index. To install it use the command
(you may need to use pip3)
pip install magnopy
Hint
You can use the command
magnopy
to check whether the installation worked.
If there are any bugs with the installation, please drop a message to the developers through one of our Support channels and we would be happy to help.
Installation from source#
Alternatively, source code of magnopy is publicly available under the GPL-3.0 license, therefore it is possible to install it from source.
Clone the project to your local computer (in other words: download the source code)
git clone git@github.com:magnopy/magnopy.git
Change the directory
cd magnopy
Install the requirements (you may need to use
pip3)pip install -r requirements.txt
To install magnopy, run (you may need to use
pip3)pip install .
Update#
If you want to update the package to the latest available version (0.1.9),
then use the command (you may need to use pip3)
pip install magnopy --upgrade