pymol-open-source icon indicating copy to clipboard operation
pymol-open-source copied to clipboard

Import Error (chempy): conflict with chempy from pip

Open jfmoulin opened this issue 2 years ago • 2 comments

Hello, upon importing pymol, I get an ImportError related to chempy

import pymol
ImportError: cannot import name 'io' from 'chempy'

I installed pymol from latest git, Importantly, I have (and need) a chempy package installed via pip on my system
I realized that pymol actually has an own chempy module.... Not quite sure how I can solve the conflict though, I cannot find chempy.py in my pymol installation

jfmoulin avatar Aug 08 '22 10:08 jfmoulin

Duplicate of #100.

cgohlke avatar Aug 12 '22 00:08 cgohlke

As mentioned above, the naming was unlucky, but we (maintainers) should have standardized this package a while ago through proper channels if we wanted this to be somewhat independent of PyMOL. I think the proper way would be for us to not have this installed directly in site-packages and perhaps namespace or rename this completely. This change will unfortunately break a lot of older scripts out there that call on PyMOL's chempy directly but probably good for long run since I do consider PyPi to be an authority for packages. This is something we'll consider when we transition to PyMOL 3.0.

JarrettSJohnson avatar Aug 21 '22 01:08 JarrettSJohnson