Ich habe gerade eine Google Cloud-Compute-Engine erstellt, google-cloud-Paket mit pip und pip3 installiert, und beim Starten eines Skripts mit python3 tritt der folgende Fehler aufImportError: kann den Namen 'opentype' bei Neuinstallation nicht importieren
from google.cloud import bigquery
File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/__init__.py", line 35,
in <module>
from google.cloud.bigquery.client import Client
File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/client.py", line 36, in
<module>
(more traceback lines..)
from pyasn1_modules.rfc2459 import Certificate
File "/usr/local/lib/python3.5/dist-packages/pyasn1_modules/rfc2459.py", line 20, in <modu
le>
from pyasn1.type import opentype
ImportError: cannot import name 'opentype'
Auf der Compute Engine werden die folgenden Pakete installiert:
pyasn1==0.1.9
pyasn1-modules==0.2.1
google-cloud==0.30.0
google-cloud-bigquery==0.28.0
die hier das Problem sein kann?
können Sie versuchen, pyasn1 den neuesten https Upgrade: //pypi.python .org/pypi/pyasn1, weil ich in meiner Maschine die neuesten und es gab keine Probleme beim Importieren. –