Author Topic: Python virtual environment is not activating  (Read 21815 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Python virtual environment is not activating
« on: December 10, 2019, 07:54:48 AM »
I am trying to install django. For that I have installed Virtual environment by using
Code: [Select]
python -m venv env. And environment installed successfully, but it is not activating when I used the shell command
Code: [Select]
source env/bin/activate. The name of the current virtual environment is NOT appear on the left of the prompt. So I understand virtual environment is not active. I am still unsuccessful. My commands in terminal given below.

user@libserver.libsoft.in /$ python3.8 -V
Python 3.8.0

user@libserver.libsoft.in /$ which python3.8
/usr/local/bin/python3.8

#I created my_env in /home/LPython/
user@libserver.libsoft.in /$ python3.8 -m venv /home/LPython/my_env

user@libserver.libsoft.in /$ cd /home/LPython/my_env

user@libserver.libsoft.in /home/LPython/my_env$ source bin/activate
user@libserver.libsoft.in /home/LPython/my_env$ 

Offline
*
Re: Python virtual environment is not activating
« Reply #1 on: December 17, 2019, 06:16:40 AM »
This problem is solved. Actually I was not using BASH shell , even if the echo $SHELL outputs bin/bash . Because of this output, I thought i was using using BASH shell. Then I login through SSH . If you are using Windows must login through PUTTY . Then I could activate my virtual environment through source my_env/bin/activate.