【问题标题】:New Python version not recognised. I installed the new python version but I get an Error when I try to install packages无法识别新的 Python 版本。我安装了新的 python 版本,但是当我尝试安装软件包时出现错误
【发布时间】:2020-01-25 15:16:57
【问题描述】:

我尝试使用安装“youtube_dl”

pip install youtube_dl

我得到了一个错误:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained
after that date. A future version of pip will drop support for Python 2.7. 

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied:
'/Library/Python/2.7/site-packages/youtube_dl-2020.1.24.dist-info'
Consider using the `--user` option or check the permissions.

我不明白这一点,因为我确实安装了最新版本的 Python。

谢谢

【问题讨论】:

  • 第一部分只是一个警告。第二部分显示您没有足够的管理员权限来执行安装。
  • 显然您只是使用了错误的 Python 版本,对吧?您没有使用任何虚拟环境吗?

标签: python


【解决方案1】:

Python 弃用消息只是一个警告,所以就像这些帖子所说:thisthis,你需要用户 --user 标志,所以试试这个:

pip install youtube_dl --user

记得先激活你的 virtualenv

【讨论】:

    猜你喜欢
    • 2019-12-24
    • 2013-05-24
    • 1970-01-01
    • 2020-04-03
    • 2020-08-01
    • 2017-04-26
    • 2022-11-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多