Problem with virtualenv activation

I installed the python environment using the commands:

SYS_INSTALL="apt-get install -y"
PIP_INSTALL="pip install"

# Be sure to install setuptools before pip to properly replace easy_install.
$SYS_INSTALL git 
$SYS_INSTALL python-dev
$SYS_INSTALL python-setuptools
$SYS_INSTALL python-pip
$PIP_INSTALL virtualenv

also managed to create a new virtual environment:

virtualenv .env

However, after executing a command, for example:

. .env/bin/activate

I got

- bash: .env / bin / activate: There is no such file or directory

After looking at the folder, .env/binI found only one file python. Full list of files here:

.env/lib:
python2.7

.env/include:
python2.7

.env/bin:
python

What is the problem?

DECISION add--always-copy

virtualenv.env - always copy

+8
source share
4 answers

The accepted answer is incomplete! In the proposed code, you left your mistake, but did not comment on it.

. .env/bin/activate , source activate .env/bin. , -, "source" ".", . , . - ., ( ).

, .env, . , ., "" Mac OS X. env venv .env.

, .env, env,

source env/bin/activate . env/bin/activate.

+5

, :

  • /,

  • run virtualenv .env

  • source .env/bin/activate

+8

source, - source env/bin/activate

virtualenv virtualenv, python activate bin

+2

. virtualenv Ubuntu, . , virtualenv -$source py3/bin/activate.

0
source

All Articles