Skip to main content
 首页 » 编程设计

python之pip 安装 dynamic-dynamodb InsecurePlatformWarning

2025年05月04日13pander-it

`我正在运行 AWS EC2 操作系统:ubuntu 14.04

python --版本 Python 2.6.9

pip --版本 来自/usr/local/lib/python2.6/site-packages (python 2.6) 的 pip 7.1.2`

$>pip install dynamic-dynamodb

`Collecting dynamic-dynamodb 
/usr/local/lib/python2.6/sitepackages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLCoenter code herentext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
  InsecurePlatformWarning 
  Using cached dynamic-dynamodb-2.0.0.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
      File "<string>", line 20, in <module> 
      File "/tmp/pip-build-QLQE6u/dynamic-dynamodb/setup.py", line 36, in <module> 
        install_requires=return_requires(), 
      File "/tmp/pip-build-QLQE6u/dynamic-dynamodb/setup.py", line 19, in return_requires 
        install_requires.append('ordereddict >= 1.1') 
    AttributeError: 'tuple' object has no attribute 'append' 
 
 
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-QLQE6u/dynamic-dynamodb` 

-------------------- 或者----------------

我从 git 中 pull 它

$>git pull https://github.com/sebdah/dynamic-dynamodb.git 
 
$> cd dynamic-dynamodb 
 
$>make install 
 
python setup.py build 
Traceback (most recent call last): 
  File "setup.py", line 36, in <module> 
    install_requires=return_requires(), 
  File "setup.py", line 19, in return_requires 
    install_requires.append('ordereddict >= 1.1') 
AttributeError: 'tuple' object has no attribute 'append' 
make: *** [install] Error 1 

任何建议我错过了什么?!

请您参考如下方法:

我同意@Juuso Meriläinen 的观点。 看起来像 this逗号打破一切:

def return_requires(): 
    install_requires = [ 
        'boto >= 2.29.1', 
        'requests >= 0.14.1', 
        'logutils >= 0.3.3', 
        'retrying >= 1.3.3' 
    ], # <---- it breaks the code 
    if sys.version_info < (2, 7): 
        install_requires.append('ordereddict >= 1.1') 
    return install_requires 

您可以尝试在本地代码中手动删除它。另外,向 dynamic-dynamodb 存储库发送 pull 请求也很好。