1

I've been trying to install cryptography python-3.4.3 on ubuntu 14.04 LTS. After downloading the libbfi and libssl, when I'm using pip3 to install cryptography. This is what I'm getting:-

Command /usr/bin/python3 -c "import setuptools,
tokenize;__file__='/tmp/pip_build_gogol/cryptography/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-s1t_s_oy-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_gogol/cryptography Storing debug log for failure in
/home/gogol/.pip/pip.log

If I run pip3 install again, this is what I'm getting.

gogol@gogol-Vostro-3558tio:~$ pip3 install cryptography 

Traceback (most recent call last):

  File "/usr/bin/pip3", line 5, in <module>

    from pkg_resources import load_entry_point

  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py", line 70, in <module>

    import packaging.version
ImportError: No module named 'packaging'

gogol@gogol-Vostro-3558tio:~$ 

please, can anyone help me? I have looked up extensively all answers here regarding cryptography, but still can't make anything out of this. A detailed answer would be very helpful. Thanks in advance.

2 Answers 2

2

All credits go to this blog: https://odedrabhavesh.blogspot.ca/2017/02/importerror-no-module-named.html

Since you are using python3, try the following with root permission:

apt-get purge -y python3-pip
wget https://bootstrap.pypa.io/get-pip.py
python3 ./get-pip.py

Then try pip install again.

Sign up to request clarification or add additional context in comments.

Comments

1

Looks like you are missing the packaging module, which is needed as a dependency. Try:

pip3 install --upgrade pip

pip3 install packaging

then retry installing cryptography.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.