Installation of PyPop7

In order to install pypop7, it is highly recommended to use the Python3-based virtual environment via venv or conda. Among them, Anaconda (or its mini version miniconda) is a very popular Python programming platform (IDE) of scientists and researchers especially for Artificial Intelligence (AI), Machine Learning (ML), Data Science, Scientific Computing, and so on.

For Virtual Environments, please refer to this online documentation for details. In most cases, using virtual environments seems to be a good practice for Python projects.

Pip via Python Package Index (PyPI)

Note

The official website of PyPop7’s Python source code is freely available at GitHub: https://github.com/Evolutionary-Intelligence/pypop.

Note that pip is the package installer for Python. You can use it to install various packages easily. For pypop7, please run the following shell command:

pip install pypop7

For Chinese users, sometimes the following PyPI configuration can be used to speedup the installation process of pypop7 owing to network blocking (note that other mirrors could be also used here):

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com

rather than the default PyPI setting:

pip config set global.index-url https://pypi.org/simple
pip config set install.trusted-host files.pythonhosted.org

If the latest cutting-edge version is preferred for development, you can install directly from the GitHub repository of the increasingly popular pypop7 library:

git clone https://github.com/Evolutionary-Intelligence/pypop.git
cd pypop
pip install -e .

Conda-based Virtual Environment

You can first use the popular conda tool to create a virtual environment (e.g., named as env_pypop7):

conda deactivate  # close exiting virtual env, if exists
conda create -y --prefix env_pypop7  # free to change name of virtual env
conda activate ./env_pypop7  # on Windows OS
conda activate env_pypop7/  # on Linux
conda activate env_pypop7  # on MacOS
conda install -y --prefix env_pypop7 python=3.8.12  # create new virtual env
pip install pypop7
conda deactivate  # close current virtual env `env_pypop7`

Note that the above Python version (3.8.12) can be changed to meet your personal Python3 version (>=3.5 if possible).

Although we strongly recommend to use the the conda package manager to build the virtual environment as your working space, currently we do not add this library to conda-forge and leave it for the future (maybe 2025). As a result, currently you can only use pip install pypop7 for conda.

For MATLAB Users

For MATLAB users, MATLAB-to-Python Migration Guide or NumPy for MATLAB Users is highly recommended. Given the fact that the USA government blocks the MATLAB license to several Chinese universities (including HIT, the affiliation of one core developer), we argue that well-designed open-source software like Python and NumPy (to name a few) is really a good alternative to MATLAB in many cases.

For R Users

For R (and S-Plus) users, NumPy-for-R is highly recommended. Note that R is a free and well-established software environment for statistical computing and graphics.

Uninstalling this Open-Source Library

If necessary, you could uninstall this open-source library freely with one shell command:

pip uninstall -y pypop7