Need help installing requests for python 3

后端 未结 1 839
野趣味
野趣味 2020-12-07 03:21

I\'m trying to get the \"requests\" module installed for python 3 on FreeBSD. I\'m using python 3.2, but I also have python 2.6 installed on the machine.

I got pip

相关标签:
1条回答
  • 2020-12-07 03:57

    Requests for some reason includes a lot of other packages, like oauthlib and chardet. But instead of just depending on them, so they get installed by pip when you install requests, the setup.py of requests are trying to install the packages as they are included. This fails under Python 3 for some reason.

    However, the requests module itself seems to get installed properly anyway. Therefore all you should need to do is to also do

    pip install chardet2 urllib3
    

    to install the missing libraries. Also report the inclusion of third-party libraries as a bug in requests. That's not how to do it.

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