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 env

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

PREVIOUS NEXT
Code Example
Python :: stop a subprocess python 
Python :: no limit row pandas 
Python :: how to add numbers in python using for loop 
Python :: return the count of a given substring from a string python 
Python :: python timeit commandline example 
Python :: extract numbers from sklearn classification_report 
Python :: require http method django view 
Python :: python datetime minus 1 day 
Python :: pandas lambda if else 
Python :: how to check sklearn version 
Python :: images subplot python 
Python :: pairplot size 
Python :: get text from url python last slash 
Python :: python randomize list 
Python :: print on two digit python format 
Python :: skip header in csv python 
Python :: number of database queries django 
Python :: binary to text python 
Python :: remainder identifying python 
Python :: get from time secs and nsecs 
Python :: nltk download without print 
Python :: matplotlib plot 
Python :: to_dataframe pandas 
Python :: uninstall python from mac 
Python :: flask enumerate index 
Python :: remove non-ascii characters python 
Python :: colorama 
Python :: matplotlib 3.0.3 wheel file 
Python :: how to iteratively create a grid within a bigger grid in python 
Python :: python dir all files 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =