Search code examples
pythonpip

Trouble installing chromo using pip


I'm trying to install a particle physics event generator interface: https://github.com/impy-project/chromo. What exactly the code is supposed to be doing isn't relevant to my problem since it's the installation itself that isn't working.

I followed the readme of the git-repo, but it seems to not have worked.

As instructed by the readme I installed the package via pip:

pip install chromo

which seemed to have worked without errors. However according to the readme I should then have been able to confirm, that everything worked via:

chromo --help

which resulted in the following message:

Command 'chromo' not found, did you mean:
  command 'chroma' from deb chroma (1.19-1ubuntu1)
  command 'chroma' from deb golang-chroma (0.9.4-1)
Try: sudo apt install <deb name>

The readme mentions, that this sometimes does not work and that you should then use

python -m chromo --help

instead. This resulted in the following

/home/trukbrog/chromo-environment/bin/python: No module named chromo.__main__; 'chromo' is a package and cannot be directly executed

I also tried to use python3 instead of python to no avail.

I am using Ubuntu jammy (22.04.2) and have tried to install chromo both inside a virtual environment and 'normally'. I tried updating python and pip, but they are both up to date.

What could be the problem here? Does anyone have any pointers, even if you've never dealt with this particular package?


Solution

  • From the logs you have shared, chromo package has been successfully installed on your Python.

    I tried to load the package version 0.0.1 with Python 3, I see that the package does not have any related help available with its source using triple-quotation multiline documentation strings which can be checked using

    import chromo
    help(chromo)
    

    and it cannot be even run from command line (I doubt because it does not have any global execution code in its program file, or some callable package binary).

    I tried to look for its documentation but couldn't find it. Perhaps it is not publicly available, and this version of package doesn't seem to include any related usage information too in the package listing. You can give its next pre-release version listed here https://pypi.org/project/chromo/#history, or wait for its future improvements.