【问题标题】:Can't install this Python module (IMDbPY) because of El Capitan? (Deprecation?)由于 El Capitan,无法安装此 Python 模块 (IMDbPY)? (弃用?)
【发布时间】:2016-11-26 12:51:43
【问题描述】:

所以我尝试使用 pip 安装 IMDbPY,但我收到以下黄色字体警告,然后是一堆红色警告。

我尝试了几个命令来解决这个问题,但没有运气。我搜索了黄色警告(以 DEPRECATION 开头)并在 Github 上找到了一个线程,详细说明了 OS X El-Capitan 的一些更改以及“六”包如何受到影响,我设法独立安装了它,但是似乎 IMDbPY 出于某种原因仍想卸载?

Installing collected packages: six, sqlparse, decorator, Tempita, sqlalchemy-migrate, IMDbPY
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-QNP1Pr-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

任何帮助表示赞赏!

【问题讨论】:

  • 它需要六个不同的版本,我会创建一个 virtualenv 并在那里安装你需要的任何东西。
  • 您是否尝试过将 sudo 与 pip 一起使用?

标签: python pip imdbpy


【解决方案1】:

如果您仍然对此感兴趣,您可以从源代码安装而不会出现任何错误。

Pip 或 easy_install 在 El Capitan 上也对我不起作用(至少在我安装它时)

你可以在http://imdbpy.sourceforge.net/downloads.html#source-code获取最新的压缩包。

希望我能帮上忙。

【讨论】:

    【解决方案2】:

    如果你使用

    pip install --user imdbpy
    

    它会起作用的。反正为我做了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-22
      • 2015-11-05
      • 2017-01-31
      • 2015-12-30
      • 1970-01-01
      相关资源
      最近更新 更多