使用--user标志安装时,Pip无法找到Package

时间:2017-05-24 16:10:24

标签: python pip packages

之前我使用sudo pip install package安装了pip包,但我切换到了pip install --user package

问题是我使用第二种方法安装了jupyter-themes,当我尝试运行它时,会抛出以下错误。

Traceback (most recent call last):
  File "/home/aswinmohanme/.local/bin/jt", line 11, in <module>
    sys.exit(main())
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/__init__.py", line 260, in main
    dfonts=args.defaultfonts)
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/__init__.py", line 54, in install_theme
    from jupyterthemes import stylefx
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/stylefx.py", line 7, in <module>
    from IPython.core.display import HTML
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/IPython/__init__.py", line 54, in <module>
    from .core.application import Application
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/IPython/core/application.py", line 23, in <module>
    from traitlets.config.application import Application, catch_config_error
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/__init__.py", line 1, in <module>
    from .traitlets import *
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 60, in <module>
    from .utils.importstring import import_item
  File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/utils/importstring.py", line 8, in <module>
    from ipython_genutils.py3compat import cast_bytes_py2
ImportError: No module named 'ipython_genutils'

这是pip list installed

的输出
...
iniparse (0.4)
ipykernel (4.5.2)
ipython (5.3.0)
ipython-genutils (0.2.0)
ipywidgets (6.0.0)
isort (4.2.5)
...

我该如何解决这个问题。

0 个答案:

没有答案