[英]No pip or conda command found in my virtual env
I was working on project and had setup a virtualenv.我正在研究项目并设置了一个virtualenv。 Everything was working fine until severe got crashed.
一切正常,直到严重崩溃。 When the server rebooted, I see all my installed packages in virtualenv is lost.
当服务器重新启动时,我看到我在 virtualenv 中安装的所有软件包都丢失了。 When I try to install packages using "pip" I see "pip: command not found" error.
当我尝试使用“pip”安装软件包时,我看到“pip: command not found”错误。 Later, I found that I have pip command is working outside of virtual env but not inside the virtual env.
后来,我发现我有 pip 命令在虚拟环境之外工作,但不在虚拟环境内部。 I am not sure how to solve the pip issue.
我不确定如何解决 pip 问题。 I have few questions which are as follows:
我有几个问题如下:
Or is there any other way.或者有没有其他方法。 Any help would be appreciated.
任何帮助,将不胜感激。 Thanks
谢谢
# put conda on PATH like
. '/SOMEWHERE/conda/etc/profile.d/conda.sh'
# then
conda activate
# or look under conda\envs
conda env list
# if you were just using base I'd recommend a create
conda create -n environment_name
# yes then reinstall everything
conda activate environment_name
I like putting conda activate environment_name in an rc/profile depending on your terminal type as to where我喜欢根据您的终端类型将 conda activate environment_name 放在 rc/profile 中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.