安装单独的第三方库时没有问题
pip install pandas
但是一旦使用requirement.txt批量安装第三方库时就会出现
-bash: /recorddata/rebuydata/hppy/soft/python3/bin/pip3:
/usr/local/source/hppy/soft/python3/bin/python3.6: bad interpreter: 没有那个文件或目录
bad interpreter看到就生气,试了好几种方法最后发现是pip的位置和python的所采用的环境不一致
which pip
which python
python采用的是新创的环境的
而pip是默认的base环境的,导致错误
最后采用
alias pip='虚拟环境的位置/bin/pip'
指定pip的位置,别的方法该bashrc文件啥的都试了都不行
————————————————
版权声明:本文为CSDN博主「BeikeDream」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/BeikeDream/article/details/133976586
- python interpreter bin directory usrpython interpreter bin directory python3 python usr bin usr bin local sbin cannot find usr bin centos7 centos bin usr bash interpreter directory test interpreter directory file such interpreter directory linux bash interpreter directory命令 错误 interpreter directory办法file