Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install --upgrade genomedata can fail on some systems, due to path.py issues #50

Open
EricR86 opened this issue Jan 2, 2019 · 3 comments
Labels
bug Something isn't working trivial

Comments

@EricR86
Copy link
Member

EricR86 commented Jan 2, 2019

Original report (archived issue) by Coby Viner (Bitbucket: cviner2, GitHub: cviner).


On Graham, I had version 1.3.6 installed via pip install --user genomedata.

Upon upgrading, via pip install --user --upgrade genomedata, to version 1.4.4, I was no longer able to use genomedata, obtaining:

#!text

Traceback (most recent call last):
  File "../../src/cytomod.py", line 673, in <module>
    from genomedata import Genome, load_genomedata
  File "/home/cviner2/.local/lib/python2.7/site-packages/genomedata/__init__.py", line 29, in <module>
    from path import path
ImportError: cannot import name path

This occurred with path.py 11.5.0, which was automatically installed. Downgrading to version 8.2.1 restored functionality, at least with respect to this single command. Uninstalling and reinstalling path.py manually, to the latest version (11.5.0) also appeared to resolve this, but other modules may have been upgraded in between doing so (unfortunately I cannot reproduce this part).

Relatedly, something similar appears to be a common issue with path.py, though not directly involving these versions or workflow. It might be a good idea to (somehow) force a reinstall of path.py or perhaps just to document this as a potential issue with the above possible solution?

@EricR86
Copy link
Member Author

EricR86 commented Jan 3, 2019

Original comment by Eric Roberts (Bitbucket: ericr86, GitHub: ericr86).


This is because of the package 'forked-path' being installed on systems. Newer versions of Genomedata use the "correct" package path.py (not an old "forked" version). Both python packages are named "path" and can conflict with each other. It's important to move away from "forked-path" but the fact that this package will remain on systems unless a clean environment is used or a forced uninstall happens is a problem I'm not sure how to work around.

There's unfortunately no good upgrade solution that I know of and all suggestions would be welcome. When upgrading, removing "forked-path" from your python packages should alleviate your issues.

@EricR86
Copy link
Member Author

EricR86 commented Jan 3, 2019

Original comment by Coby Viner (Bitbucket: cviner2, GitHub: cviner).


Thanks for those details! I don't have a better idea either, except perhaps the genomedata installation checking for and warning about an existing "forked-path" package.

@EricR86
Copy link
Member Author

EricR86 commented Feb 24, 2019

Original comment by Michael Hoffman (Bitbucket: hoffman, GitHub: michaelmhoffman).


You should be able to use the pkg_resources module to force specific versions of dependencies at runtime. https://setuptools.readthedocs.io/en/latest/pkg_resources.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working trivial
Projects
None yet
Development

No branches or pull requests

1 participant