-bash: /usr/bin/virtualenvwrapper.sh: 没有那个文件或目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34772925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 14:06:04  来源:igfitidea点击:

-bash: /usr/bin/virtualenvwrapper.sh: No such file or directory

linuxbashshellpython-3.xvirtualenvwrapper

提问by user1807271

I can't figure out where the shell is trying to run /usr/bin/virtualenvwrapper.shupon server login. I want virtualenvwrapper permanently uninstalled, not just removed from the shell instance. I thought I uninstalled it with pip uninstall virtualenvwrapper, but every time I log into the server I get the error -bash: /usr/bin/virtualenvwrapper.sh: No such file or directory, as if there is some sort of leftover artifact. Yesterday I did a lot of tinkering and I can't remember all the changes I made or how I made this happen. Where is it executing the search for virtualenvwrapper.sh?

我无法弄清楚 shell/usr/bin/virtualenvwrapper.sh在服务器登录时试图运行的位置。我希望 virtualenvwrapper 永久卸载,而不仅仅是从 shell 实例中删除。我以为我用 卸载了它pip uninstall virtualenvwrapper,但是每次登录服务器时都会出现错误-bash: /usr/bin/virtualenvwrapper.sh: No such file or directory,好像有某种遗留的工件。昨天我做了很多修补,我不记得我所做的所有改变或我是如何做到这一点的。它在哪里执行搜索virtualenvwrapper.sh

SUPPLEMENTARY INFO

补充资料

$ echo $PATH
/usr/lib64/qt-3.3/bin
/usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/etc
/usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/bin
/usr/local/bin
/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/sbin/usr/local/bin/CASAVA-1.8.2/bin
/usr/local/bin/blast
/usr/local/bin/mirdeep2
/usr/local/bin/velvet

$ sudo vim ~/.bashrc
1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5         . /etc/bashrc
6 fi
7
8 # User specific aliases and functions

回答by Tarique

on ubuntu 12.04 LTS, installing through pip, it is installed to

在 ubuntu 12.04 LTS 上,通过 pip 安装,安装到

/usr/local/bin/virtualenvwrapper.sh

And if you are using Ubuntu 16.04 or later, it is installed to

如果您使用的是 Ubuntu 16.04 或更高版本,它会安装到

~/.local/bin/virtualenvwrapper.sh

回答by njachowski

There are a number of files that might be run when you login to your terminal if you are using the bashshell.

如果您使用的是bashshell,那么在您登录终端时可能会运行许多文件。

You should check ~/.bashrc, ~/.bash_profile, ~/.bash_loginand ~/.profilefor "/usr/bin/virtualenvwrapper.sh".

您应该检查~/.bashrc~/.bash_profile~/.bash_login~/.profile为“/usr/bin/virtualenvwrapper.sh”。

Likely one of those files is being run on login and contains the missing script which you uninstalled.

可能其中一个文件正在登录时运行,并且包含您卸载的丢失脚本。

回答by udeep shrestha

sudo -H pip3 install virtualenvwrapper

sudo -H pip3 安装 virtualenvwrapper

i ran into to similar problem where installation could not suceed because ~/.cache/pip and ~/.cache/pip/http is not owned by the current user. installing with -H or --set-home option solved my problem.

我遇到了类似的问题,安装无法成功,因为 ~/.cache/pip 和 ~/.cache/pip/http 不属于当前用户。使用 -H 或 --set-home 选项安装解决了我的问题。