私はmacOS Sierraを使用しています。 builtwith
をインポートするとき、私は、これらの次のエラーを取得する:Python 3.xのインポートエラーです。SyntaxError
Daniels-MacBook-Pro:~ Daniel$ python
Python 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import builtwith
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/danielotero/anaconda3/lib/python3.5/site-packages/builtwith/__init__.py", line 43
except Exception, e:
^
SyntaxError: invalid syntax
私はそれを正しくインポートするために何ができますか?
使用しているPythonのバージョンと互換性のあるバージョンのモジュールを使用してください。 – kindall
'例外を除いて、e:'はPython 3では有効な構文ではなくなりました。 – rassar
そのモジュールはPython 3をサポートしていません。あなた自身でそれを置くなら、Python 2インタプリタを使うように設定してください。 Pipなどでインストールした場合は、問題の図書館にバグレポートを提出してください。 –