Failed to install wsgiref on Python 3

后端 未结 2 494
清酒与你
清酒与你 2021-01-17 13:57

I have a problem installing wsgiref:

$ python --version
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)
$ pip --version
pip 9.0.1 from /anaconda/lib/pyth         


        
相关标签:
2条回答
  • 2021-01-17 14:21

    wsgiref is already been included as a standard library in Python 3... So in case if you are trying with Python 3 just go ahead and import wsgiref thats it.

    0 讨论(0)
  • 2021-01-17 14:29

    According to this line SyntaxError: Missing parentheses in call to 'print', I think it needs Python 2.x to run the setup.py. Whether to use parentheses in print is the different syntax of Python 2 and Python 3.

    This is the solution from the Github issue:

    There are a few fixes that will get you running, in order of least work to most:

    1. Switch over to python2.7 for your will installs.

    2. Try to upgrade wsgiref with pip install --upgrade wsgiref, and see if the latest version works with your setup, and with will (if it doesn't, you'd notice the http/webhooks stuff not working.

    3. If you try 2) and it works, submit a PR here with the upgraded version in requirements.txt. (You can find out what versions you've got by using pip freeze).

    You can find more about the syntax difference here

    0 讨论(0)
提交回复
热议问题