How to install pynetdicom

Note

We recommend installing into a virtual environment, which is an isolated Python environment that allows you to install packages without admin privileges.

Install the official release

pynetdicom requires Python and pydicom. In addition, if you want to use the qrscp application then sqlalchemy is also required.

Install using pip

pynetdicom is available on PyPi, the official third-party Python software repository. The simplest way to install (or upgrade) from PyPi is using pip with the command:

pip install -U pynetdicom

You may need to use this instead:

python -m pip install -U pynetdicom

Install using conda

pynetdicom is also available for conda on conda-forge:

conda install -c conda-forge pynetdicom

To upgrade the installed version on conda do:

conda update pynetdicom

After installation

Now that pynetdicom is installed you might be interested in the tutorial for new users.

Install the development version

To install a snapshot of the latest code (the master branch) from GitHub:

pip install git+https://github.com/pydicom/pynetdicom

The master branch is under active development, and while it’s usually stable it may have undocumented changes or bugs.

If you want to keep up-to-date with the latest code, make sure you have Git installed and then clone the master branch (this will create a pynetdicom directory in your current directory):

git clone https://github.com/pydicom/pynetdicom

Create a new virtual environment

In the activated environment install poetry:

pip install -U poetry

Change to the pynetdicom directory and install pynetdicom and the required development packages using poetry:

cd pynetdicom/
poetry install --with dev

When you want to update your copy of the source code, run git pull from within the pynetdicom directory and Git will download and apply any changes.