Solvedansible error in cryptography setup command: Invalid environment marker: python_version < '3'
✔️Accepted Answer
I had the same problem in Debian Jessie. This is what I did to get it working for me:
sudo pip install --upgrade setuptools
sudo apt-get install libffi-dev libssl-dev
After this I was able to install ansible (2.4.0.0)
Other Answers:
You can try that:
- Red Hat Enterprise Linux Server release 7.3 (Maipo)
- Python 2.7.5
$ virtualenv ansible
$ source ansible/bin/activate
$ pip install --upgarde setuptools
$ pip install cffi
$ pip install ansible
Best regards
It seems that the problem is with old pip versions. Installing the newest version from bootstrap.pypa.io eliminates the problem.
@grvtechno did you try running pip install --upgrade pip
?
This is not a problem with ansible, and as the error mentions, this is with the cryptography python module. The resolution however is to update your version of python setuptools.
Should you want to open an issue, you would need to do so with https://github.com/pyca/cryptography
If you have further questions please stop by IRC or the mailing list:
- IRC: #ansible on irc.freenode.net
- mailing list: https://groups.google.com/forum/#!forum/ansible-project
Hi there,
The team at stresisand effect suggested that I open an issue here. I am receiving the following error when installing ansible:
error in cryptography setup command: Invalid environment marker: python_version < '3'
My system is Ubuntu 16.04 LTS
My python is:
python --version
Python 2.7.6
I also have python 3.4.0 on my system.
Should I make an python alias so that it python defaults to python 3.4.0? But I think my streisandeffect install might need python 2.x to work. Thank you.
ISSUE TYPE
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 16.04 LTS
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS