Solve the problem of executing python\\"ImportError: No module named requests\\"

888u

Last update at :2024-06-18,Edit by888u

Yesterday afternoon, classmate Lao Tang sent a message, telling me that OP merchants can automatically select Hong Kong computer room VPS hosts, because during the previous Black Friday, it was a rare half-price event to directly open three VMs, but they could not be opened in Hong Kong. The machine (they can only use it in Hong Kong, but the resources are too few), and even if it is opened, the IP is blocked.

Seeing that it is about to expire and there is no suitable machine, the script not given here can automatically obtain and filter normal IP resources after modifying the parameters. Of course, this information should be provided by experts on the Internet (our Chinese are smart) . So I modified a few parameters according to the introduction, and then found a VPS with python installed to run the software directly. However, there is an error message "ImportError: No module named requests".

File \\”vm.py\\”, line 1, in import requestsImportError: No module named requests

It can be seen that there are no requests. You can install it directly. I will also record it here, in case there is a similar need to install it directly.

yum install python-requests -y

My test machine here is centos. If we are debian, just change yum to apt-get.

After the installation is complete, we can execute the python script.

Recommended site search: Which foreign server is the best to rent, US server, registration-free virtual space, permanent free linux server, free http proxy ip, foreign server, cloud host, domain name host, vps host, how to buy virtual host, < /p>

Solve the problem of executing python\\

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码