我在多个环境中尝试过,debian 8、ubuntu 14.04 和 ubuntu 16.04,当我尝试安装 pynacl 时出现此错误
Collecting pynacl
Downloading PyNaCl-1.1.2.tar.gz (3.1MB)
100% |████████████████████████████████| 3.1MB 482kB/s
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pynacl)
Requirement already satisfied: cffi>=1.4.1 in /home/ubuntu/.local/lib/python3.5/site-packages (from pynacl)
Requirement already satisfied: pycparser in /home/ubuntu/.local/lib/python3.5/site-packages (from cffi>=1.4.1->pynacl)
Installing collected packages: pynacl
Running setup.py install for pynacl ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0jn9smso/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-p98b0l22-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/nacl
copying src/nacl/hash.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/hashlib.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/signing.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/exceptions.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/public.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/secret.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/pwhash.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/utils.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/__init__.py -> build/lib.linux-x86_64-3.5/nacl
copying src/nacl/encoding.py -> build/lib.linux-x86_64-3.5/nacl
creating build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_box.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_hash.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/randombytes.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_pwhash.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_sign.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_generichash.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/sodium_core.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_shorthash.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/utils.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/__init__.py -> build/lib.linux-x86_64-3.5/nacl/bindings
copying src/nacl/bindings/crypto_secretbox.py -> build/lib.linux-x86_64-3.5/nacl/bindings
running build_clib
configure: error: working directory cannot be determined
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-0jn9smso/pynacl/setup.py", line 232, in <module>
"Programming Language :: Python :: 3.6",
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
self.run_command('build')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-0jn9smso/pynacl/setup.py", line 159, in run
cwd=build_temp,
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-build-0jn9smso/pynacl/src/libsodium/configure', '--disable-shared', '--enable-static', '--disable-debug', '--disable-dependency-tracking', '--with-pic', '--prefix', '/tmp/pip-build-0jn9smso/pynacl/build/temp.linux-x86_64-3.5']' returned non-zero exit status 255
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0jn9smso/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-p98b0l22-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0jn9smso/pynacl/