You must have at least version 3.9 of Python (currently).
If you just want to try things out or are in a hurry and want to install the developer version in whichever Python kernel you're currently running in a Notebook, here's a handy bash script that you can copy and paste into a Jupyter notebook. The Notebook should be run in the directory where zoonyper will be installed:
When in production, you can use PyPI to install zoonyper:
$ pip install zoonyper
Warning
This command will not work currently, as this package is not yet published on PyPI.
Because this project is in active development, you will likely need to install from the repository for the time being.
In order to do so, you need to first ensure that you have installed Poetry:
$ curl -sSL https://install.python-poetry.org | python3 -
Warning
Make sure the command above, after the pipe |
refers to the correctly
linked Python, i.e. you may want it to refer to python
or python3
or whatever your symlinked binary is called.
Note
Don't forget to add export PATH="/home/<username>/.local/bin:$PATH" to
your shell configuration file in order to get access to the poetry
tool on your command line.
Then, clone the repository:
$ git clone [email protected]:Living-with-machines/zoonyper.git
Once it has been cloned, navigate into the newly created local repository:
$ cd zoonyper
First, you will want to activate Poetry's shell:
$ poetry shell
Then, install the dependencies:
$ poetry install
Note
You may run into an issue here, with the installation of furo
:
• Installing furo (2022.12.7): Failed
_WheelFileValidationError
["In /home/<username>/.cache/pypoetry/artifacts/38/be/e4/0afbe5654cdc0168ebfaf6864c20009c2eec3dd953961a7d44e0ed3fe9/furo-2022.12.7-py3-none-any.whl, hash / size of furo/__init__.py didn't match RECORD", "In /home/<username>/.cache/pypoetry/artifacts/38/be/e4/0afbe5654cdc0168ebfaf6864c20009c2eec3dd953961a7d44e0ed3fe9/furo-2022.12.7-py3-none-any.whl, hash / size of furo/_demo_module.py didn't match RECORD", ... [etc]
If this is the case, see the solution in the python-poetry repository
The easiest solution is to exit poetry (by running exit
and running:
$ pip install poetry==1.4.0
This is a problem with poetry 1.4.1 so it may be solved by the time you're reading this.
Following that, you can run a build and pip install
from the local files:
$ poetry build && pip install dist/zoonyper-0.1.0.tar.gz
Now you should be able to use zoonyper
as a regular package on your local
computer.
Warning
If you change the source code (located in the zoonyper
directory in
the repository), you will need to rerun the poetry build
and the
pip install dist/zoonyper-0.1.0.tar.gz
commands again.
If you are in a hurry and want to install the developer version in whichever Python kernel you're currently running in a Notebook, here's a handy bash script that you can copy and paste into a Jupyter notebook:
%%bash
curl -sSL https://install.python-poetry.org | python - &&
if [ ! -d "zoonyper" ] ; then git clone [email protected]:Living-with-machines/zoonyper.git; fi &&
cd zoonyper &&
poetry shell &&
poetry build &&
pip install dist/zoonyper-0.1.0.tar.gz