【问题标题】:Trying to install package to my home directory results in error尝试将软件包安装到我的主目录会导致错误
【发布时间】:2017-10-11 21:04:28
【问题描述】:

我正在使用亚马逊 Linux。我没有 sudo 并且想将软件包安装到我的家庭目录中。所以我正在尝试以下方法,但出现错误,

“没有为 awscii 找到匹配的分布”

[myuser@mymachine ~]$ pip install --user awscii
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting awscii
/home/myuser/.local/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/myuser/.local/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement awscii (from versions: )
No matching distribution found for awscii
[myuser@mymachine ~]$

将 python 包安装到我的主目录的正确方法是什么?

【问题讨论】:

  • 我觉得你打错了,应该是awscli
  • 另外建议你使用virtualenv安装更新版本的Python。
  • @kiran.koduru,我的机器没有 sudo 访问权限,如何安装 virtualenv?
  • pip install --user virtualenv 应该可以工作,不是吗?

标签: python amazon-web-services amazon-s3 aws-cli amazon-linux


【解决方案1】:

默认的ec2-user 有sudo 权限,所以你应该可以升级你的python 版本

$ sudo yum update

我认为这甚至应该将您升级到 python27。

如果不是如果你想安装 python 27

$ sudo yum install python27

如果你想安装 python 3

$ sudo yum install python34

【讨论】:

    猜你喜欢
    • 2019-06-16
    • 1970-01-01
    • 2017-10-03
    • 1970-01-01
    • 2021-04-26
    • 2022-12-05
    • 2019-07-06
    • 1970-01-01
    • 2016-11-23
    相关资源
    最近更新 更多