1
我試圖在我的Mac上安裝hashlib
。 pip
不起作用,並且easy_install
也不起作用。 這裏是錯誤:未能在python3.5中安裝hashlib - 錯誤代碼1
Collecting hashlib
Using cached hashlib-20081119.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/feedparser.py", line 27, in <module>
from email import message
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/message.py", line 16, in <module>
from email import utils
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/utils.py", line 28, in <module>
import random
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/random.py", line 45, in <module>
from hashlib import sha512 as _sha512
File "/private/var/folders/nw/flrm4y0d499fk5xr2ppxk4sr0000gn/T/pip-build-lv720o4k/hashlib/hashlib.py", line 80
raise ValueError, "unsupported hash type"
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/nw/flrm4y0d499fk5xr2ppxk4sr0000gn/T/pip-build-lv720o4k/hashlib/
任何進一步的建議將是偉大的。提前致謝!
'hashlib'是Python標準庫的一部分。你不需要安裝它。 –
哦,但是當我試圖用任何函數從庫它給了我一個錯誤說'AttributeError的:「builtin_function_or_method」對象有沒有屬性「update''(這是在使用更新功能的情況下) – JC1
然後請留言原始錯誤(使用您的代碼和正確的描述),而不是您的解決方法的問題。 –