Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

linux create virtualenv

# Install virtualenv using pip3
sudo pip3 install virtualenv

# Create virtualenv
virtualenv venv
virtualenv -p python3 venv # To create virtualenv with python3 for example
virtualenv -p /usr/bin/python2.7 # To create virtualenv with Python interpreter of your choice

# Activate virtualenv
source venv/bin/activate

# Desactivate venv
deactivate
Comment

create virtualenv in linux python

#Creating virtual environment in Linux

$ sudo apt-get install python-pip
#Then install virtualenv

$ pip install virtualenv
#Now check your installation

$ virtualenv --version
#Create a virtual environment now,

$ virtualenv virtualenv_name
#After this command, a folder named virtualenv_name will be created. You can name anything to it. If you want to create a virtualenv for specific python version, type

$ virtualenv -p /usr/bin/python3 virtualenv_name
or

$ virtualenv -p /usr/bin/python2.7 virtualenv_name
#Now at last we just need to activate it, using command

$ source virtualenv_name/bin/activate
#Now you are in a Python virtual environment

#You can deactivate using

$ deactivate
Comment

create virtualenv

virtualenv name
Comment

create virtualenv

virtualenv name
Comment

Linux python virtual environment

$ virtualenv venv --distribute
New python executable in venv/bin/python
Installing distribute.........done.
Installing pip................done.
$ source venv/bin/activate
(venv)$ python
Comment

PREVIOUS NEXT
Code Example
Python :: django static url 
Python :: delete unnamed coloumns in pandas 
Python :: how to format integer to two digit in python 
Python :: turn list of tuples into list 
Python :: python string cut substring 
Python :: shutil copy folder 
Python :: How to get current CPU and RAM usage in Python? 
Python :: how to import .csv file in python 
Python :: docs.python.org 
Python :: open mat python 
Python :: how to use python to sleep if the user is not using the system 
Python :: fuzzy lookup in python 
Python :: key press python 
Python :: order dictionary by value python 
Python :: python trace table generator 
Python :: pretty json python 
Python :: delete files with same extensions 
Python :: datetime year python 
Python :: python convert string to date 
Python :: django template for range 
Python :: how to print hello world in python 
Python :: fibonacci sequence python 
Python :: selectfield flask wtf 
Python :: multiply all values in column pandas 
Python :: get count of unique values in column pandas 
Python :: Python loop to run for certain amount of seconds 
Python :: python print in one line 
Python :: how to do http requetss python 
Python :: pandas concatenate 
Python :: copy a list python 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =