qpython not able to download requests module

若如初见. 提交于 2020-07-05 12:21:12

问题


I am using qpython for programming python on android.In my script I am importing requests module and so I have tp install requests module from pip.When I run pip install requests command I get the following error:

error build/lib.linux-armv71-2.7/requests/auth.py:operation not permitted qpython

I get this error twice while installing requests and so I am not being able to run my script.


回答1:


You might need to manually download requests, extract and move it to your Lib/site-packages/Requests/ folder, from there python should be able to import from it. I don't see that package available for qpython, it might work out of the box or it might still need to be ported.

After installing qpython on my current device I was able to open the app, go to My QPython ->Scripts and use pip_console.py to try to install it but as you said it fails. I'm going to test later my above recommendation. My install directory is /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/ and that is where I'm going to drop the requests library.




回答2:


To run pip on qpython just use the steps below: import pip pip.main(['install', 'bs4'])

The above is to install bs4 for BeautifulSoup. Worked for me :)




回答3:


The newest version ( 1.3.1 ) from google play has fixed this issue.




回答4:


This solution did not work or me...but I did resolve it by downloading the new beta v2.1 from

https://github.com/qpython-android/qpython/releases

Google play did not give me the latest version (I had 1.xx)

I was able to use QPYPY to install requests and it automatically installed the required library urllib3.



来源:https://stackoverflow.com/questions/24949261/qpython-not-able-to-download-requests-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!