0
votes

So when I am trying to install cryptography via

python -m pip install cryptography

I get two error messages coming back:

  1. Failed building wheel for cryptography
  2. command "/usr/local/bin/python -c "import setuptools, tokenize;file='/private/var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-build-DBR7_Y/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-msQ3gT-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-build-DBR7_Y/cryptography

Any ideas on how to fix this problem?

3
What OS are you running?Leb
Execute /usr/local/bin/python -c "import setuptools, tokenize;file='/private/var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-build-DBR7_Y/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-msQ3gT-record/install-record.txt --single-version-externally-managed --compile (the command that failed) and show the output.User

3 Answers

0
votes

Like in your other post Trouble with running pip install

run your same command with sudo

0
votes

may be its dependecies hang on your netword, you could install them first in my case, it depend on idna, enum34, ipaddress, pycparser, so

 pip install idna enum34 ipaddress pycparser

and then install cryptography

`pip install cryptography`

how to know cryptography's dependecies? cryptography's dependecies depend on system environment, when it hang on, you can find the log like this, first line is its dependecies.

Installing collected packages: cryptography, idna, enum34, ipaddress, pycparser
Running setup.py install for cryptography
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
0
votes

In my case, I was running an old version of pip, getting this error message:

You are using pip version 7.1.0, however version 8.1.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

I simply updated to the newest version, I had no trouble installing:

pip install --upgrade pip