Comment on page
Let’s start interacting with the python library by firstly installing it & its prerequisites.
From the adventurous
Python 3.8.5all the way up to
Python 3.10.4, ocean.py has got your back! 🚀
ocean.pycan join you on your
Python 3.11journey, a few manual tweaks may be required. But worry not, brave explorers, we've got all the juicy details for you below! 📚✨ ⚠️ Make sure that you have
build-essentialor their equivalents installed on your host.
# Create your working directory
# 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
# Avoid errors for the step that follows
pip install wheel
# Install Ocean library.
pip install ocean-lib
Issue: M1 *
- If you have an Apple M1 processor,
cryptographyinstallation may fail due missing packages, which come pre-packaged in other operating systems.
- Workaround: ensure you have
libtoolinstalled as it is mentioned in the prerequisites, e.g. using Homebrew or MacPorts.
Issue: MacOS “Unsupported Architecture”
ocean.pytreats each Ocean smart contract as a Python class, and each deployed smart contract as a Python object. We love this feature, because it means Python programmers can treat Solidity code as Python code! 🤯
Oh, buoy! 🌊🐙 When it comes to installation, ocean.py has you covered with a special README called "install.md". It's like a trusty guide that helps you navigate all the nitty-gritty details. So, let's dive in and ride the waves of installation together! 🏄♂️🌊
Last modified 26d ago