Installation
For installing pypop7, it is highly recommended to use the Python3-based virtual environment via e.g. venv or conda. Among them, Anaconda (or its mini version miniconda) is a very popular Python programming platform (IDE) of scientists and engineers especially for Artificial Intelligence (AI), Machine Learning (ML), Evolutionary Computation (EC), Swarm Intelligence (SI), Data Science (DS), and Scientific Computing (SC).
For Virtual Environment, please refer to e.g. venv’s online document for its necessary details. In the development stage, using the virtual environment seems to be a very good practice for various 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 open-source packages easily. For pypop7, please run the following shell command directly:
pip install pypop7
For Chinese users, sometimes the following PyPI configuration can be used to speedup the installation process of pypop7 for bypassing possible network blocking:
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
(Note that other mirrors for PyPI could be also used here.)
If its latest cutting-edge version is preferred for development, you can install directly from the GitHub repository of this increasingly popular pypop7 library:
git clone https://github.com/Evolutionary-Intelligence/pypop.git
cd pypop
pip install -e .
Conda-based Virtual Environment (Env)
You can first use the popular conda (Miniconda) 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 freely changed to meet your personal Python-3 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 an increasing number of well-designed open-source software like Python, NumPy, SciPy, and scikit-learn (just to name a few) are really wonderful alternatives to commercial 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.
Uninstallation
If necessary, you could uninstall this open-source Python library freely with only one shell command:
pip uninstall -y pypop7
After you have installed it successfully, we wish that you could enjoy a happy journey on PyPop7 for black-box optimization.