pydicom / deid

best effort anonymization for medical images using python
https://pydicom.github.io/deid/
MIT License
141 stars 43 forks source link

pip3 download question #70

Closed fimafurman closed 5 years ago

fimafurman commented 6 years ago

pip3 download deid==0.1.18 for pretty much all python packages results in whl file bing downloaded, however for deid, gz source is downloaded and I need to generate the whl file by running setup.py bdist_wheel option. Not a big deal, but Is there a reason while deid behaves differently?

vsoch commented 6 years ago

My preference is for setuptools, so that pip uninstall actually works :) can you show me the two different cases, restate your issue, and the functionality you would want? Heads up I’m about to go for a run so I’ll be afk for a couple of hours so no rush!

fimafurman commented 6 years ago

Have a wonderful run! Here's an example where the whl file is downloaded for numpy, however tar.gz is downloaded for deid:

aiservice_ _ffurman_ailup01___stg_ai-services_aiservice_dist_ _ssh_ffurman_ailup01_ _207x51

My preference would be that a whl file is downloaded, so that deid installation behaves just like other python modules.

vsoch commented 6 years ago

The wheel is downloaded for numpy because you already installed as wheel. I’m reluctant to install not using setuptools because wheel does not provide an easy why to specify console scripts, of which died is one. It also gives you an error message that it cannot uninstall a distutils package which I’m not a fan of. I understand wheel is an official specification but in practice I haven’t liked using it, build most tools into containers that become read only binaries anyway, and need the features offered by setuptools. Perhaps you can offer a solution to provide both kinds of distributions with a preference for setuptools? What is the issue with building ones own wheel with that simple command?

fimafurman commented 6 years ago

It's not a problem, I will just build using bdist_wheel. I am still zeroing in the optimal production deployment mechanism.

vsoch commented 6 years ago

Ok sounds good! I would definitely consider providing your tools via containers, something I’m guessing you are already doing! Singularity is a good solution for HPC (or academic use) and of course Docker is bread and butter but doesn’t give you a single read only binary. Please let me know if you need any help, I’m a big fan of containers :0)

vsoch commented 6 years ago

I do agree that for beasty libraries like numpy (with lots of underlying dependencies and things to compile) my preference would be wheel too. But I still haven't found a wheel solution that I like for simple packages like deid. I'll do more reading on this though, there is a lot to learn and maybe a good intermediate solution (aside from running the command) is out there somewhere. :man_dancing:

vsoch commented 5 years ago

Closing this issue, thanks for the suggestion @fimafurman and definitely will keep in mind for the future!