- Linux, MacOS, or Windows
- Docker, Docker Compose, allowing non-root users
- Python 3.8.5 - Python 3.10.4, Python 3.11 with some manual alterations
Ocean.py requires some basic system dependencies which are standard to development images. If you encounter trouble during installation, please make sure you have autoconf, pkg-config and build-essential or their equivalents installed.
In a new console:
# Create your working directory
mkdir my_project
cd my_project
# Initialize virtual environment and activate it. Install artifacts.
# Make sure your Python version inside the venv is >=3.8.
# Anaconda is not fully supported for now, please use venv
python3 -m venv venv
source venv/bin/activate
# Avoid errors for the step that follows
pip install wheel
# Install Ocean library.
pip install ocean-lib
Issue: M1 * coincurve
or cryptography
- If you have an Apple M1 processor,
coincurve
andcryptography
installation may fail due missing packages, which come pre-packaged in other operating systems. - Workaround: ensure you have
autoconf
,automake
,libtool
andpkg-config
installed, e.g. using Homebrew or MacPorts.
Issue: Could not build wheels for coincurve
- Reasons for this happening are usually missing dependencies.
- Workaround:
- make sure you have the OS-level development libraries for building Python packages:
python3-dev
andbuild-essential
(install e.g. using apt-get) - install the OS-level
libsecp256k1-dev
library (e.g. using apt-get) - install pyproject.toml separately, e.g.
pip install pyproject-toml
- if ocean-lib installation still fails, install coincurve separately e.g.
pip install coincurve
, then retry
- make sure you have the OS-level development libraries for building Python packages:
Issue: MacOS "Unsupported Architecture"
- If you run MacOS, you may encounter an "Unsupported Architecture" issue.
- Workaround: install including ARCHFLAGS:
ARCHFLAGS="-arch x86_64" pip install ocean-lib
. Details.
Issue: Dependencies and Python 3.11
- ocean.py depends on the
parsimonious
package. In turn,parsimonious
depends ongetargsspec
, which doesn't support Python 3.11. The workaround: open the package's expressions.py file (e.g. in ./venv/lib/python3.11/site-packages/parsimonious/expressions.py), and change the lineimport getfullargspec as getargsspec
instead of the regular import.
You've now installed Ocean, great!
Next step is setup: