gpt4 book ai didi

django - 激活 virtualenv 时出错

转载 作者:行者123 更新时间:2023-12-03 03:28:16 25 4
gpt4 key购买 nike

当我尝试激活我的虚拟环境时收到此错误即源 ~/edu-venv/bin/activate

-bash: /home/vagrant/edu-venv/bin/activate: No such file or directory

我该怎么办?

几个小时前,当我执行 vagrant shutdown 时,我收到了此错误

c:\Django\sites\vagrant>vagrant halt
[default] Attempting graceful shutdown of VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["showvminfo", "507b7f20-3a71-40bd-90e6-63ecde326ccd", "--machinereadable"]

Stderr: VBoxManage.exe: error: Details: code E_ACCESSDENIED (0x80070005), callee IUnknown
VBoxManage.exe: error: Context: "COMGETTER(RemoteUSBDevices)(ComSafeArrayAsOutParam(coll))" at line 1840 of fi
le VBoxManageInfo.cpp

但是我立即执行了 vagrant up ,它启动了,执行了 vagrant stop ,它优雅地停止了,然后我关闭了我的电脑。现在它不起作用

最佳答案

如果您已经位于虚拟环境中,那么您需要退出虚拟环境才能激活您的环境。 如果你在这里的某个地方-

 $-home/vagrant/edu-venv

然后,您需要退出该目录。转至此 -

 $-home/vagrant/

然后尝试运行您的命令 -

 $-home/vagrant source edu-venv/bin/activate

希望,这有帮助!

关于django - 激活 virtualenv 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18001579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com