新建了一个conda环境"tf2",在该环境内想要使用pip命令下载第三方包,结果出现问题:
script file 'D:softwareAnaconda3envstf2scriptspip-script.py' is not present.
在网上查找解决方案后,使用easy_install命令进行安装,安装过程中的打印内容如下:
(tf2) C:UsersDESNY>easy_install pip WARNING: The easy_install command is deprecated and will be removed in a future version. Searching for pip Best match: pip 20.2.4 Adding pip 20.2.4 to easy-install.pth file Installing pip-script.py script to c:usersdesnyappdatalocalprogramspythonpython39scripts Installing pip.exe script to c:usersdesnyappdatalocalprogramspythonpython39scripts Installing pip3-script.py script to c:usersdesnyappdatalocalprogramspythonpython39scripts Installing pip3.exe script to c:usersdesnyappdatalocalprogramspythonpython39scripts Installing pip3.8-script.py script to c:usersdesnyappdatalocalprogramspythonpython39scripts Installing pip3.8.exe script to c:usersdesnyappdatalocalprogramspythonpython39scripts Using c:usersdesnyappdatalocalprogramspythonpython39libsite-packages Processing dependencies for pip Finished processing dependencies for pip (tf2) C:UsersDESNY>pip install gym script file 'D:softwareAnaconda3envstf2scriptspip-script.py' is not present.
虽然打印内容显示安装成功,但是再一次想要使用pip命令的时候依旧报之前的错误。
又仔细查看了一遍打印内容,发现pip相关文件都安装在用户文件夹下,而不是安装在conda环境的文件夹下,于是尝试将c:usersdesnyappdatalocalprogramspythonpython39scripts文件夹下的pip-script.py、pip.exe、pip3-script.py、pip3.exe、pip3.8-script.py、pip3.8.exe六个文件复制到D:softwareAnaconda3envstf2scripts文件夹下。
再次使用pip命令就正常了。



