-
Notifications
You must be signed in to change notification settings - Fork 314
Setting up Conda environment
Gagandeep Singh edited this page Dec 27, 2021
·
3 revisions
This wiki documents the process of setting up conda environment for working on PyDataStructs project.
Linux Users
- Download anaconda from https://www.anaconda.com/products/individual. Make sure that you choose the right installer for your architecture. You can scroll down (in the above link) to find a section by the name of, Anaconda Installers.
- It will download a
.shfile. You will have to open the terminal and run,bash <downloaded_file_name>.shor./<downloaded_file_name>.sh. Accept the license, and let the other options remain default. However, in the end conda will ask a yes/no question. It will be about automatically initialising conda for your shell. Just typeyesthere. It isnoby default though we won't recommend going for that option. - Once done, verify the installation by running,
conda --version. It should output the version number and some other metadata which you can ignore. - Now, run,
conda create -n pyds python=3.8. It will list a set of packages that will be installed in your new environment. Typeyeswhen it asks for your approval. - Run,
conda activate pyds. Finally, you are inside your environment for pydatastructs. - Change your directory to the path where you have cloned
pydatastructsproject. Make sure that you have activated thepydsenvironment. - Now execute,
pip install -r requirements.txtandpip install -r docs/requirements.txt, one after the other. - Now, install pydatastructs in development mode using,
python scripts/build/develop.py. - Run the tests,
pytest --doctest-modules --cov=./ --cov-report=html. They should pass in a matter of seconds. - Build the docs using,
sphinx-build -b html docs/source/ docs/build/html. There will be a lot of warnings which you can safely ignore. Go inside,docs/build/htmland open theindex.htmlfile in your preferred browser.
Apple Silicon Users
- Download mambaforge from this URL, https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh
- As you can see from the above link, it will download
Mambaforge-MacOSX-arm64.sh. You have to follow the same steps as for Linux users from here onwards (i.e., 2 - 10). No differences.
Guide for Windows developers coming soon.