.. install:
===============
Install EasyIDP
===============
EasyIDP Python packages are distributed via
`PyPI `_.
Supported Python versions:
* 3.8
* 3.9
* 3.10
* 3.11
Supported operating systems:
* Windows 10 (64-bit)
* Windows 11 (64-bit)
* macOS 10.15+
* Manjaro
The following operating system should also works, but have not been tested:
* Ubuntu 18.04+
* ArchLinux
Using this package requires basic Python programming knowledge, including basic python gramma and package installation.
Install from PyPI
=================
Here assuming the user has python3 and pip installed in the computer, and in the command line, the following operation works:
.. code-block:: bash
C:\Users\xxx> python --version
Python 3.7.3
C:\Users\xxx> pip --version
pip 19.2.3
Then install the package by:
.. code-block:: bash
pip install easyidp
.. note::
In general, we recommend using a
`virtual environment `_
or `conda environment `_ to avoid dependices conflict with your local environment.
Please refer :doc:`backgrounds/virtualenv` for more details.
For Linux users, depending on the configurations, ``pip3`` may be needed for
Python 3, or the ``--user`` option may need to be used to avoid permission
issues. For example:
.. code-block:: bash
pip3 install easyidp
# or
pip install --user easyidp
# or
python3 -m pip install --user easyidp
.. tip::
For users in China, it is recommended to use Tsinghua source to accelerate the download speed:
.. code-block:: bash
> pip install easyidp -i https://pypi.tuna.tsinghua.edu.cn/simple
.. _using-from-source-code:
Using from source code
======================
If you need to make some changes to the source code (e.g. fix bugs) and want it work immediately (rather than waiting for offical fix). You can also using from the source code directly.
Assuming the source package was downloaded in ``C:\path\to\source\code\EasyIDP`` and the ``code`` folder has the following files:
.. code-block:: text
C:\path\to\source\code\EasyIDP
├─ docs/
├─ src/
| |─ easyidp/
├─ tests/
readme.md
pyproject.toml
...
.. tip::
Please ensure you have uninstalled the pypi easyidp in your current environment:
.. code-block:: bash
pip uninstall easyidp
and need to restart python to make changes taking effects.
You can install to your virtual environment by:
.. code-block:: bash
> cd "C:/path/to/source/code/EasyIDP" # contains setup.py
> pip install -e .
Or using the following code to manual import easyidp package:
.. code-block:: python
import sys
sys.path.insert(0, r'C:/path/to/source/code/EasyIDP/src')
import easyidp as idp