python help('modules') returns ImportError

↘锁芯ラ 提交于 2019-12-11 01:13:27

问题


Recently, (I have no idea when), I installed this package called pymol. Today when I was trying to copy a list of all my install modules, I encountered this error.

~/Projects$ python -c "help('modules')"
Please wait a moment while I gather a list of all available modules...

Error: unable to initalize the pymol.cmd module
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pymol/cmd.py", line 117, in <module>
    from chempy import io
ImportError: cannot import name io

I've tried

sudo pip uninstall pymol

This definitely worked... but it also definitely did not work. It removed the .egg, and pip list tells me it's not installed, but the tool is still there. I open a python prompt and import it with no problem. Now my question is, if I just delete the package, is there anything that could go wrong, (WCS I'm thinking kafkaesque broken dependency fixing for the rest of my natural life.) and is there a standardized, best practice to remove this, or any other package manually.

来源:https://stackoverflow.com/questions/25213533/python-helpmodules-returns-importerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!