Как установить pip для установки внешних пакетов в роботе NAO - PullRequest
0 голосов
/ 11 июля 2019

Я написал некоторый код и хочу запустить его на роботе NAO, но, к сожалению, я использовал в своем коде несколько пакетов, таких как pygame и boto3, так что теперь для работы с этим кодом на NAO мне нужно установить пакеты на роботе NAO,Может кто-нибудь объяснить, пожалуйста, процесс.

Я попытался запустить файл get-pip.py в NAO, используя ssh nao @ ip, но не могу установить. Я пытался скопировать файлы пакетов в 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

Я также пытался установить пакеты без pip, используя sudo python setup.py install Но в этом случае он показывает ошибку ниже:

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

1 Ответ

1 голос
/ 11 июля 2019

У вас есть:

SystemTimeWarning: Системное время отключено (до 2017-06-30). это вероятно приведет к ошибкам проверки SSL

Исправьте системное время, иначе проверка ssl завершится неудачей.

Может работать как перец, следуйте инструкциям здесь

Вы также получите

SNIMissingWarning: запрос HTTPS выполнен, но SNI (сервер Расширение TLS на этой платформе недоступно. Это может привести к тому, что сервер представит неверный сертификат TLS, что может привести к ошибкам проверки. Вы можете перейти на более новую версия Python, чтобы решить эту проблему. Для получения дополнительной информации см. https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

Чтобы исправить это, вам нужно установить requests[security] пакет

Вы также можете установить пакеты без pip, как указано здесь

...