--Umgebung: Cloud9
$ pip install hmac
Defaulting to user installation because normal site-packages is not writeable
Collecting hmac
Downloading hmac-20101005.tar.gz (4.5 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.6/dist-packages (from hmac) (36.2.7)
Collecting hashlib
Downloading hashlib-20081119.zip (42 kB)
|████████████████████████████████| 42 kB 1.1 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5jes0rhx/hashlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5jes0rhx/hashlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-uvx1s968
cwd: /tmp/pip-install-5jes0rhx/hashlib/
Complete output (22 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/dist-packages/setuptools/__init__.py", line 10, in <module>
from setuptools.extern.six.moves import filter, map
File "/usr/lib/python3.6/dist-packages/setuptools/extern/__init__.py", line 1, in <module>
from pkg_resources.extern import VendorImporter
File "/usr/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
File "/usr/lib64/python3.6/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib64/python3.6/email/feedparser.py", line 27, in <module>
from email._policybase import compat32
File "/usr/lib64/python3.6/email/_policybase.py", line 9, in <module>
from email.utils import _has_surrogates
File "/usr/lib64/python3.6/email/utils.py", line 28, in <module>
import random
File "/usr/lib64/python3.6/random.py", line 46, in <module>
from hashlib import sha512 as _sha512
File "/tmp/pip-install-5jes0rhx/hashlib/hashlib.py", line 80
raise ValueError, "unsupported hash type"
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Es scheint, dass hmac und hashlib verfügbar sind, auch wenn Sie sie nicht installieren ...
Requirement already satisfied: setuptools in /usr/lib/python3.6/dist-packages (from hmac) (36.2.7)
Es steht geschrieben.
Sobald Sie das Ergebnis kennen, verstehen Sie nicht, warum Sie versucht haben, es vorerst zu installieren.
Ich war zum ersten Mal sehr verwirrt mit HMAC und Cloud9 und habe sogar Python aktualisiert ...
OK, wenn Sie "import hmac, hashlib" schreiben und verwenden