Ich habe Python 2.7.6 mit Spyder 2.2.5 auf Ubuntu 14.04.5. Ich konnte keine Verbindung zur Ipython-Konsole herstellen, daher entscheide ich mich, den Spyder zu aktualisieren:Kann Spyder wegen SNI Warnung nicht aktualisieren
Die folgenden Fehler werden ausgegeben. Der Text der obersten ist:
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: Ein HTTPS-Anfrage wurde gemacht, aber die SNI (Subject Name Indication) -Erweiterung zu TLS ist auf dieser Plattform nicht verfügbar. Dies kann dazu führen, dass der Server ein falsches TLS-Zertifikat vorlegt, was zu Validierungsfehlern führen kann. Sie können auf eine neuere Version von Python aktualisieren, um dies zu beheben. Weitere Informationen finden Sie unter https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
Voll Stack-Trace:
/usr/local/lib/python2.7/dist-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
/usr/local/lib/python2.7/dist-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
Collecting spyder
Downloading spyder-3.1.4-py2-none-any.whl (3.5MB)
100% |████████████████████████████████| 3.5MB 387kB/s
Requirement already up-to-date: pygments>=2.0 in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: jedi>=0.9.0 in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: pyflakes in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: pylint in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: nbconvert in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: qtpy>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from spyder)
Requirement already up-to-date: pyzmq in /usr/local/lib/python2.7/dist-packages (from spyder)
Collecting numpydoc (from spyder)
Downloading numpydoc-0.6.0.tar.gz
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/usr/local/lib/python2.7/dist-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/usr/local/lib/python2.7/dist-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
Ich habe versucht, einige andere Pakete wie ndg-httpsclient
installieren, urllib3[secure]
ohne Glück. Es löst genau den gleichen Fehler aus. Ich kann Python selbst nicht aktualisieren. Kann jemand helfen?
Hinweis: Ich habe python-dev libffi-dev libssl-dev
bereits installiert.
haben Sie up-to-date 'pip',' setuptools' und 'requests' Versionen? Vielleicht auch eine gute Zeit, um Python selbst zu aktualisieren, 2.7.6 ist keine "aktuelle" Version (veröffentlicht 2013 ...), wenn Sie Python-2 weiterhin verwenden möchten, zumindest auf 2.7.13 aktualisieren. – MSeifert
2.7.6 ist das Standard-Python für Ubuntu 14.04 und mir wurde gesagt, dass ich mich nicht damit anlegen sollte. Mein 'pip' ist bereits auf dem neuesten Stand (9.0.1), und ich habe' requests' (auf 2.14.2) und 'setuptools' auf die neueste Version aktualisiert. Aber das Aktualisieren von Spyder hat immer noch diesen Fehler. –
Ja, Sie müssen Ihre System Python nicht ersetzen. Sie können 'virtualenv' oder' conda' verwenden, um separate Python-Installationen zu verwalten. Aber das waren nur Vermutungen, ich habe diesen Fehler nie gesehen, ich habe nur mögliche Ursachen beseitigt (und im Allgemeinen ist es keine schlechte Idee, aktuelle Pakete zu haben). :) – MSeifert