Environment Setup
There are plenty ways to setup a local development environment for Python such as virtualenv
, Pipenv
, conda
, etc.
We recommend conda
for its ease of use and a wide variety of support for other libraries.
Installing conda
The installation steps are a little different across different operating systems, the official installation guide can be found here (opens in a new tab). Between Miniconda and Anaconda, Miniconda is more than sufficient for our usage.
Creating a new environment
After successfully installing conda, create a new environment by running
# eg. conda create -n cybotrade python==3.11
conda create -n <environment_name> python==3.11
This will create a new conda environment with Python 3.11 installed, if everything is successful you shall see the following prompt.
Activating the environment
To activate the environment in your current terminal session, run
# eg. conda activate cybotrade
conda activate <environment_name>
If you are using VS Code, remember to point the Python interpreter to the version installed in your environment by doing
Ctrl + Shift + P
or Cmd + Shift + P
, type Python: Select Interpreter
and enter. Then, select the Python version
from your environment such as the following screenshot.