I am using kali linux and is trying to import a module called requests to run an exploit. ( https://www.exploit-db.com/exploits/47138 ) if you want to know more about the exploit. when i try to run the following command
sudo pip install requests
i kept getting this result
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.23.0)
this cant work at all as i requires the Requests module to be in python2.
How can i get it installed?
您应该使用此命令,它将确保您正在为 python2 安装模块:
python2 -m pip install --user --upgrade requests
You could use the following command:
sudo pip2.7 install requests
(Assuming that you have Python 2.7. If you have a different version, swap out the version number)
pip install <package> -t <directory>
-t specifies the target directory where you want your package to be installed
So in your case you can do pip install requests -t "C:\\Python27\\Lib\\site-packages" (This is where my site-packages folder is.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.