如何安装pip以在NAO机器人中安装外部软件包

时间:2019-07-11 07:00:03

标签: python-2.7 pip pygame boto3 nao-robot

我已经编写了一些代码,并希望在NAO机器人上运行它,但是不幸的是,我在代码中使用了pygame和boto3之类的软件包,因此现在要在NAO上运行此代码,我必须在NAO机器人上安装这些软件包,有人可以解释一下这个过程吗?

我尝试使用ssh nao @ ip在NAO上运行get-pip.py文件,但无法安装 我一直在尝试将软件包文件复制到NAO,但这也不能解决问题。 我关注了https://community.ald.softbankrobotics.com/ja/node/1506论坛,但仍然无法解决

下面是我运行get-pip.py文件时的控制台输出

PS C:\Users\hp> ssh nao@169.254.252.60 Password: nao [0] ~ $ su Password: root@nao [0] nao # ls Ashim DigiCertHighAssuranceEVRootCA.pem classes.bin diagnosis naoqi recordings DigiCertHighAssuranceEVRootCA.crt angles.bin couples.bin expo.bin rayons.bin remotes root@nao [0] nao # cd Ashim root@nao [0] Ashim # ls boto3 client_secret.json example.py jmespath pip python-engineio six botocore custom-env get-pip.py mpolly.py pygame python-socketio urllib3 root@nao [0] Ashim # python get-pip.py 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. Collecting pip /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:354: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server 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/advanced-usage.html#ssl-warnings /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/connection.py:324: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors /tmp/tmpdQ8F7J/pip.zip/pip/_vendor/urllib3/util/ssl_.py:150: 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/advanced-usage.html#ssl-warnings Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping ERROR: Could not find a version that satisfies the requirement pip (from versions: none) ERROR: No matching distribution found for pip root@nao [err 1] Ashim #

此外,我尝试更新系统时间,但这也不能解决问题。输出与以前相同:

root@nao [err 127] nao # ntpdate                                                                                        
17 Sep 02:55:02 ntpdate[8986]: no servers can be used, exiting
root@nao [err 1] nao # ntpdate -s 0.de.pool.ntp.org
root@nao [0] nao # ntpdate
11 Jul 10:51:42 ntpdate[9024]: no servers can be used, exiting
root@nao [err 1] nao # cd Ashim

我还尝试使用sudo python setup.py install安装没有pip的软件包 但是在这种情况下,它显示以下错误:

error: could not create '/usr/lib/python2.7/site-packages/awscli-1.16.196-py2.7.egg': No space left on device

1 个答案:

答案 0 :(得分:1)

您有一个:

  

SystemTimeWarning:系统时间已到(2017-06-30之前)。这个   可能会导致SSL验证错误

修复系统时间,否则ssl验证将失败。

它可能类似于胡椒粉,请按照说明here

您还将获得

  

SNIMissingWarning:已发出HTTPS请求,但SNI(服务器   TLS的名称指示)扩展名在此平台上不可用。   这可能会导致服务器出示不正确的TLS证书,   这可能会导致验证失败。您可以升级到较新的版本   版本的Python可以解决这个问题。有关更多信息,请参见   https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

要修复此问题,您需要安装requests[security]软件包

您也可以按照here

的说明安装不包含pip的软件包