栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【问题解决】Script file ‘xxx‘ is not present. (conda环境)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【问题解决】Script file ‘xxx‘ is not present. (conda环境)

新建了一个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命令就正常了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/286680.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号