<aside> 🪟 These instructions were written assuming MacOS/Linux. If you’re using a Windows computer, please reach to help@pathbird.com for support. We’re happy to help!
</aside>
The easiest way to get started is to create a Python virtual environment (venv) for Pathbird. This assumes you already have Python installed on your computer. These instructions assume you will place all your notebooks in the Pathbird directory of your home directory.
In a terminal, run the following commands:
mkdir -p ~/Pathbird
cd ~/Pathbird
python3 -m venv ./venv
# The "." here is a command that is used to configure your terminal session
# to use the Python installation at ~/Pathbird/venv
. ~/Pathbird/venv/bin/active
. ~/Pathbird/venv/bin/activate
pip install ipykernel
python -m ipykernel install --user --name=Pathbird
. ~/Pathbird/venv/bin/activate
# Change numpy and scipy to whatever Python packages you need
pip install numpy scipy
For every codex you upload, you’ll need to generate a requirements.txt file. In a terminal:
# Change "My Codex" to whatever folder your notebook file is located within
cd "~/Pathbird/My Codex"
. ~/Pathbird/venv/bin/activate
pip list --format freeze > requirements.txt
To upload a Python codex to Pathbird, you’ll need to have a requirements.txt file in the same directory as the notebook file.
Your requirements.txt file should include the exact version of all your direct dependencies (versions can be obtained using the pip freeze command).
If your notebook uses numpy and pandas, you’ll need to make sure that both are present in your requirements.txt file (in general, and import xxx should have a corresponding entry).
To get the versions, we can use pip freeze: