error in activating virtualenv

3

I got this error when I tried to activate my virtual env i.e. source ~/edu-venv/bin/activate

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

what should I do ?

few hours back when I did vagrant halt I got this error

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

But then I immediately did vagrant up and it started and did vagrant halt it stopped gracefully then I shut down my pc. Now its not working

django
virtualenv
virtualbox
vagrant
asked on Stack Overflow Aug 1, 2013 by user2539745 • edited Aug 1, 2013 by user2539745

2 Answers

0

If you already are in your virtual-env, then you need to come out of it, in order to activate your environment. If you are somewhere here-

 $-home/vagrant/edu-venv

Then,you need to come out of that directory. Go to this instead -

 $-home/vagrant/

and, then try running your command -

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

Hope, this helps!

answered on Stack Overflow Jan 12, 2015 by mbhambry
-1

Step 1 - Creat a new virtual environment in your project directory ('myproject')

mkdir myproject
cd myproject
virtualenv venv

Step 2 - Activate the corresponding environment

For Linux/OS X:

venv/bin/activate

For Windows:

venv\scripts\activate
answered on Stack Overflow Mar 19, 2018 by ptphdev • edited Mar 19, 2018 by ptphdev

User contributions licensed under CC BY-SA 3.0