Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python use .env

import os
from dotenv import load_dotenv

load_dotenv()

GCP_PROJECT_ID = os.getenv('GCP_PROJECT_ID')
SERVICE_ACCOUNT_FILE = os.getenv('SERVICE_ACCOUNT_FILE')
STORAGE_BUCKET_NAME = os.getenv('STORAGE_BUCKET_NAME')
Comment

py env

#------FOR LINUX/MAC---------#
sudo apt-get install build-essential libssl-dev libffi-dev python-dev #installing requirements
sudo apt-get install -y python3-venv #installing venv 
python3 -m venv env #creating virtual env
source env/bin/activate #activating virtual env


#-------FOR WINDOWS----------# 
py -m pip install --user virtualenv #installing venv
py -m venv env #creating virtual env
.envScriptsactivate #activating virtual env
Comment

python virtual env

$ pip install virtualenv
Comment

python env

python3 -m venv tutorial-env
tutorial-envScriptsactivate.bat (window)
source tutorial-env/bin/activate (linux)
Comment

python virtual env

$ virtualenv --version
Comment

python virtual env

$ source venv/bin/activate
Comment

python virtual env

$ cd project_folder
$ virtualenv venv
Comment

python virtual env

$ virtualenv -p /usr/bin/python2.7 venv
Comment

python environment

# Creating New conda Env.

Conda create -n my_env python == 3.6.9

Conda activate -n my_env 

pip install jupyter
Comment

python virtual env

$ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
Comment

python virtual env

$ pip install --user pipenv
Comment

PREVIOUS NEXT
Code Example
Python :: python allowed variable caracters 
Python :: drop all characters after a character in python 
Python :: python classes 
Python :: found features with object datatype 
Python :: urllib3 python 
Python :: convert dictionary keys/values to lowercase in python 
Python :: Beautifulsoup - How to open images and download them 
Python :: limit for loop python 
Python :: django create new project 
Python :: program count the number of occurrences of a letter in a string python 
Python :: python iter on a dic key value 
Python :: python convert to percentage 
Python :: python make a dictionary 
Python :: print pattern a shape in python 
Python :: how to make python turn a list into a text file grapper 
Python :: pvm python 
Python :: python printing variables 
Python :: python program for swapping position of two numbers 
Python :: python convert object into ditct 
Python :: numpy array length 
Python :: how to print a number at the end of a for loop in python 
Python :: anaconda 3 geopandas 
Python :: python average of list 
Python :: Select rows in pandas MultiIndex DataFrame 
Python :: library for converting text into image in python 
Python :: get name of variable python 
Python :: ComplexWarning: Casting complex values to real discards the imaginary part 
Python :: Python program to draw star 
Python :: How to select rows in a DataFrame between two values, in Python Pandas? 
Python :: python scraping 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =