Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';pip2和x27;不被识别为内部或外部命令_Python - Fatal编程技术网

Python ';pip2和x27;不被识别为内部或外部命令

Python ';pip2和x27;不被识别为内部或外部命令,python,Python,我正在尝试使用Python2.7在我的Windows10计算机上运行python脚本 我运行ff命令: python boxtool.py 然后我得到了ff错误: 'pip2' is not recognized as an internal or external command, operable program or batch file. 'pip2' is not recognized as an internal or external command, operable prog

我正在尝试使用Python2.7在我的Windows10计算机上运行python脚本

我运行ff命令:

python boxtool.py
然后我得到了ff错误:

'pip2' is not recognized as an internal or external command,
operable program or batch file.
'pip2' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File boxtool.py", line 14, in <module>
    from requests.exceptions import ConnectionError
ImportError: No module named requests.exceptions

我是Python新手。有人能告诉我如何解决这个问题吗?

下载
get-pip.py
文件:get-pip.py on

然后使用python安装它

python get-pip.py

Python2很旧,不受支持,为什么不使用Python3呢?我想我运行的程序是用Python2编写的。请尝试
os.system(“pip安装请求”)
(检查pip可执行文件是否在您的路径上)。另外,我知道可以从脚本中安装依赖项,但我确实不了解这种方法。使用requirements.txt instead下载文件并将其放在程序所在的文件夹中。然后我试着运行它。我遇到以下错误:
错误:找不到满足要求的版本pip(从版本:无)错误:找不到与pip匹配的发行版
如果您的问题仍未解决,请写信给我alokmahor@gmail.com
python get-pip.py