Ecart
Ecart

Reputation: 53

cannot activate virtualenv: No such file or directory

I have problem with activating virtualenv. I'm working on the server and using SSH secure shell.

My final goal is to activate virtualenv and run the latest version of tensorflow

The following is the command lines:

jeonguyoang@vision6:~$ python3 -m venv tfenv
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

jeonguyoang@vision6:~$ source tfenv/bin/activate
-bash: tfenv/bin/activate: No such file or directory
jeonguyoang@vision6:~$ cd tfenv
jeonguyoang@vision6:~/tfenv$ ls
    bin  include  lib  lib64  pyvenv.cfg
jeonguyoang@vision6:~/tfenv$ cd bin
jeonguyoang@vision6:~/tfenv/bin$ ls
    python  python3

captured image of the commands

I think that there is no activate file. Maybe re-installing virtualenv is the answer, but I cannot interrupt server settings..

Upvotes: 3

Views: 1562

Answers (1)

George Shuklin
George Shuklin

Reputation: 7887

Check if you have python 2 versions of pip and python (python-all & python-pip packages). Venv installs both v2 and v3 versions of python & pip (regardless of python version of venv).

Upvotes: 1

Related Questions