- 서버 시간 설정

ubuntu@ip-172-31-41-115:~$ date
Tue May 17 04:25:14 UTC 2022
ubuntu@ip-172-31-41-115:~$ sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
ubuntu@ip-172-31-41-115:~$ date
Tue May 17 13:25:23 KST 2022

- 파이썬 설치 확인

ubuntu@ip-172-31-41-115:~$ python
Command 'python' not found, did you mean:
  command 'python3' from deb python3
  command 'python' from deb python-is-python3
  
ubuntu@ip-172-31-41-115:~$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

확인했음

>> exit()

 

1. 가상환경설치

- 우분투 패키지 최신으로 업그레이드

ubuntu@ip-172-31-41-115:~$ sudo apt update

그럼 주루륵 설치

이 과정을 생략하면 python3-venv등의 패키지를 설치할 수 없움

- 파이썬 패키지 설치

ubuntu@ip-172-31-41-115:~$ sudo apt install python3-venv

- conda 설치 

ㅊㅊ-> https://mishuni.tistory.com/118 / https://ieworld.tistory.com/12#recentComments

ubuntu@ip-172-31-41-115:~$ ls
Anaconda3-2022.05-Linux-x86_64.sh  anaconda3  mydjango

ubuntu@ip-172-31-41-115:~$ cd anaconda3
ubuntu@ip-172-31-41-115:~/anaconda3$ ls
LICENSE.txt      condabin  include    man          plugins     sbin   translations
bin              doc       lib        mkspecs      pyodbc.pyi  share  var
compiler_compat  envs      libexec    phrasebooks  qml         shell  x86_64-conda-linux-gnu
conda-meta       etc       licensing  pkgs         resources   ssl    x86_64-conda_cos6-linux-gnu

ubuntu@ip-172-31-41-115:~/anaconda3$ source ~/.bashrc
ubuntu@ip-172-31-41-115:~/anaconda3$ export PATH=/home/ubuntu/anaconda3/bin:$PATH
(base) ubuntu@ip-172-31-41-115:~/anaconda3$ conda -V #버전
conda 4.12.0

ubuntu@ip-172-31-41-115:~$ rm Anaconda3-2022.05-Linux-x86_64.sh
ubuntu@ip-172-31-41-115:~$ ls
anaconda3  mydjango

- 가상환경 만들기

ubuntu@ip-172-31-41-115:~$ conda create -n mydjango
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/ubuntu/anaconda3/envs/mydjango



Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate mydjango
#
# To deactivate an active environment, use
#
#     $ conda deactivate

ubuntu@ip-172-31-41-115:~$ conda activate mydjango
(mydjango) ubuntu@ip-172-31-41-115:~$