0

I try to run a dockerized pants build for a scala project and it fails with an error message "error in cryptography setup command: Invalid environment marker: python_version < '3' ". I haven't manually specified anything to install cryptography. In the documentation of cryptography I could see that it happens either because of pip or setuptools is out of date. I tried to update this as well. But in case of pants I'm not very sure where should I specify this also. I specified this in pants file and in thidparty "requirements.txt" file. But no difference . It was working fine but suddenly it failed one day.

I use the following versions of

Ubuntu -14.04

python -2.7.4

pants -1.0.0 (tried upgrading to 1.1.0 but no difference)

Aaryan
  • 1
  • 2
  • 2
    Python 2.7.4 is `< '3'`, so no no wonder it fails. You will have to install Python 3. – Klaus D. Oct 17 '17 at 07:43
  • @Klaus D. Really?? I have a lot of dependencies of python since my codebase is large. I just tried to upgrade to python 3 and many of them faces issues. Also with the same versions it was working fine till date. Since the migration is time consuming can there be another option? – Aaryan Oct 17 '17 at 08:53
  • Well, then you will have to make a decision what you want to use: the Python 2 or the Python 3 packages. – Klaus D. Oct 17 '17 at 09:32
  • @Klaus D. Thanks for the info. I will go with python 2 packages as of now. But how can I let pants know that it should go with a version of cryptography that can be accepted by 2.7? Where should I specify that in case of pants? – Aaryan Oct 17 '17 at 09:52

1 Answers1

0

Explicitly mentioning following versions in requirements.txt for pants builds will resolve the issue

pycparser==2.17 cryptography==2.0.1