1

I am trying to install dicompyler to read DICOM-RT plan files through conda, but getting a 'PackageNotFoundError'.

The package is on Github at https://github.com/dicompyler/dicompyler-core. When downloading and install the tar using

pip install [directory\filename]

I get 'Command "python setup.py egg_info" failed with error code 1 in [directory]'.

Is there a way to install either through conda or from the tar?

  • Possible duplicate of [pip install from git repo branch](https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch) – Derek Brown Feb 23 '18 at 05:29

2 Answers2

0

I just tried to install the packages from the github, and it seems succeeded. Below is my step:

1:Clone the code:

git clone https://github.com/dicompyler/dicompyler-core.git

2:Install from the source:

cd dicompyler-core
sudo python3.6 setup.py install

3:Result:

..........
Using /usr/local/lib/python3.6/site-packages
Finished processing dependencies for dicompyler-core==0.5.3


Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2

Type "help", "copyright", "credits" or "license" for more information.
>>> import dicompylercore
>>>
Alex Lee
  • 309
  • 3
  • 11
  • Thank you. I couldn't run the git clone command (due a firewall my work network?), but was able to download a .zip from https://github.com/dicompyler/dicompyler-core.git and install using "python setup.py install". This was on windows, btw: "sudo" doesn't work. – David Heffernan Feb 25 '18 at 21:50
  • Yes, sudo is Linux command to use superuser privilege. On windows, just run "python setup.py install" will be OK. – Alex Lee Feb 26 '18 at 03:13
0

Since you are using Anaconda in your project you need to create its environment in the directory of your project:

conda create --name env python=3

Then activate it:

source activate env

Then download the archive from the github if you're trying to install the package from archive. Unpack the archive and then enter the unpacked directory and run:

python setup.py install

Then it will successfully install the required package dicompyler.

Hope this helps.

Nurjan
  • 5,889
  • 5
  • 34
  • 54