Installing a python package that is not supported by pip

Hello, I have a python script that uses Ezc3d library: GitHub - pyomeca/ezc3d: Easy to use C3D reader/writer for C++, Python and Matlab

I can’t use pip to install it on Slicer as it is not supported. I’ve installed it using Anaconda. Is it possible to make slicer use Anaconda interpreter ?

I tried to work around it by extending the search path to my anaconda environment but it doesn’t work.
image

Is there another way I can achieve this ?
image

Thank you very much for your time.

Anaconda is very opinionated, it makes many assumptions about how Python should work, so I don’t think anaconda packages would be compatible with Slicer’s Python environment. Also, Anaconda is a commercial product, so there could be licensing concerns about using packages in a completely free, restriction-free environment.

Since ezc3d is not a native Python package, it is not trivial to build it. I would suggest to submit an issue to the package’s GitHub repository asking for making it avaialble on PyPI. If you don’t get any response, then it could make sense to use a c3d package that is available on PyPI.

In general, if a Python package does not have wheels on PyPI then I would not recommend to rely on it, because most likely it has insufficient developer resources and/or community support for testing, troubleshooting, fixing bugs, etc. Also, such projects are usually maintained by a single person, and if that person loses interest, changes job, or hit by a bus, you need to switch to another package anyway. It is better to start with the right package in the first place.

Thank you for your prompt response

For the future readers who searches how to install ezc3d without PyPI (I am the developer for ezc3d)

As of last week, ezc3d is on PyPI. So no need to compile by hand anymore (nor relying on conda). That said, what is @lassoan is saying is indeed true; I am the sole developer of the package, but as of now, I am still active, and hope I don’t get hit by a bus!

That said, since the c3d format does not evolve that much, it is unlikely that for the near or middle future, even if I was stopping the development of which, that it would stop working.

Hope this helps make you the best decision for your needs! :slight_smile:

@Pariterre As of right now ezc3d will still be unavailable to Slicer users to install by PyPI provided whl as Slicer’s embedded Python version is 3.9. It appears ez3cd 1.5.16 and 1.5.17 on PyPI requires Python 3.10+.

That is correct as type hints that uses “|” are in the code.