0

Im using 3.4.3 for a school project but it seems pip doesnt like this. I am working in a VM. I get this error when I pip3 install flask.

Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_vagrant/MarkupSafe

with this also:

 class DistutilsLoader(importlib.util.abc.Loader):
 AttributeError: 'module' object has no attribute 'abc'

I checked and originally I had no dist-packages directory in /usr/lib/python3.4 but i had an existing dist-packages in /usr/lib/python3/, so I made a symlink from /usr/lib/python3.4 to the existing dist-packages. Not quite sure what else to do, short of reinstalling Python or worse the VM... I am digging into the pip.log but it seems verymuch the same as what I have already seen.

2
  • 2
    See today's issue: github.com/pypa/setuptools/issues/2362. Perhaps you just upgraded setuptools? Try to downgrade it. Try pip install --upgrade "setuptools<44" Commented Aug 31, 2020 at 22:03
  • thank, this with the other answer was able to get flask installed on my system. @phd Commented Aug 31, 2020 at 22:16

1 Answer 1

4

Python 3.4.3 is pretty ancient and no longer supported. In fact, no version of Python 3.4 is still supported. I strongly recommend upgrading to a modern version of Python, ideally 3.8.

The current version of Flask requires Python 2.7 or Python 3.5+.

If you absolutely must stay on Python 3.4, try installing version 1.0.4, which appears to be the newest version that supports Python 3.4:

pip3 install flask==1.0.4
Sign up to request clarification or add additional context in comments.

2 Comments

Yeah Im stuck with 3,4,3 for a school project :( Thanks for this answer, with the setuptools downgrade hint and this I was able to get the correct flask installed with python3. You rock!
@derric-d, glad to help. But phd's comment might have been sufficient. Normally, I think pip finds the right version by itself, honouring Python version constraints.

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.