smashwilson / slack-emojinator

Bulk upload emoji into Slack
MIT License
328 stars 52 forks source link

lxml 4.1.0 from Pipfile.lock not compatible with Python 3.7 or above #35

Open chief-tyrol opened 4 years ago

chief-tyrol commented 4 years ago

Was scratching my head over this issue for a while, so documenting it to benefit others.

The current version of lxml in Pipfile.lock (4.1.0) was released on 2017-10-13, and doesn't appear to be compatible with Python versions 3.7 or newer.

Minimal example showing the issue

Succeeds

git clone git@github.com:smashwilson/slack-emojinator.git
cd slack-emojinator/
docker run --rm -w=/workdir -v "$(pwd)":/workdir python:3.6 sh -c 'pip install pipenv; pipenv install'

Fails

git clone git@github.com:smashwilson/slack-emojinator.git
cd slack-emojinator/
docker run --rm -w=/workdir -v "$(pwd)":/workdir python:3.7 sh -c 'pip install pipenv; pipenv install'

(I also tried with Python 3.8, and got the same error)

I've attached the output of the failing example here: error_log.txt

Suggested Remediation

Short term, just making a note in the README that Python 3.6 is required is probably sufficient, long term upgrading lxml would likely fix the issue

drew-beres commented 4 years ago

I was able to workaround this issue by specifying the python version as a pipenv option argument:

pipenv --python 3.6.9 install
payamazadi commented 4 years ago

Thanks guys this was helpful. I'm on 3.7.5 on Mac and don't want to mess with python versions..(even with pipenv!?) I changed the Pipfile line with the lxml version to this: lxml = ">4.4." And I ran the script and it worked.