가상 환경 파이썬 3.9

코드 예제

31
0

가상 env 파이썬 만들기

#------FOR LINUX/MAC---------#
#installing venv 
sudo apt-get install python3.6-venv
#creating virtual env
python3 -m venv env
#activating virtual env
source env/bin/activate


#-------FOR WINDOWS----------#
#installing venv
py -m pip install --user virtualenv
#creating virtual env
py -m venv env
#activating virtual env
.\env\Scripts\activate
4
0

virtualenv 에 python 설치 라이브러리


# ------- How to use a virtual environment on MAC? -------- #
# Use the command line to:

 1º - Instal Python3 and pip3
  
  
 2º - Create a folder for your virtual environment:
 
  >> cd "path_to_the_place_you_want_to_locate_your_folder"
  
  >> python3 -m venv "name_of_env"
  
  
 3º - Activate this virtual environment:

  >> source "name_of_env"/bin/activate
  
  
 4º - Now you can install new things inside this environment:
  
  >> pip3 install django  # for example

 
4
0

파이썬 만들기 virtualenv

pip install virtualenv # install first
cd projectfolder # go to project folder
python -m venv ./venv # Create a virtual environment named venv
Activate.ps1 # (powershell) start the file  to start the environment
activate.bat # (cmd) start the file  to start the environment
# if it worked you'll see a (venv) in front of your cursor path

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................