반응형

Looks like you haven't properly installed the header files and static libraries for python dev.

Use your package manager to install them system-wide.

 

For apt (Ubuntu, Debian...):

sudo apt-get install python-dev   # for python2.x installs
sudo apt-get install python3-dev  # for python3.x installs

For yum (CentOS, RHEL...):

sudo yum install python-devel # for python2.x installs 
sudo yum install python3-devel # for python3.x installs

For dnf (Fedora...):

sudo dnf install python2-devel # for python2.x installs 
sudo dnf install python3-devel # for python3.x installs

For zypper (openSUSE...):

sudo zypper in python-devel # for python2.x installs 
sudo zypper in python3-devel # for python3.x installs

For apk (Alpine...):

# This is a departure from the normal Alpine naming 
# scheme, which uses py2- and py3- prefixes 

sudo apk add python2-dev # for python2.x installs 
sudo apk add python3-dev # for python3.x installs

For apt-cyg (Cygwin...):

apt-cyg install python-devel # for python2.x installs 
apt-cyg install python3-devel # for python3.x installs

 

반응형

반응형

Step1. 사전 준비

파이썬 설치를 위해서는 GCC 컴파일러가 필수입니다. 설치가 필요한 서버에 ssh or shell로 접속합니다.

그리고 이외 필수로 필요한 라이브러리를 설치합니다.

# yum install gcc openssl-devel bzip2-devel libffi-devel

Step2. 다운로드 Python 3.8

파이썬 공식사이트에 접속하여 Python 3.8 최신 버전을 확인 후 링크를 복사 후 아래의 커멘드를 사용하여 다운로드 합니다.

 

# cd /opt
# sudo wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz

Step3. Python 3.8 설치

아래의 커멘드로 파이썬을 컴파일합니다.

cd Python-3.8.0
sudo ./configure --enable-optimizations
sudo make altinstall

Step4. Python 버전 확인

아래 처럼 파이썬을 버전을 확인합니다.

# python3.8 -V

Python 3.8.0
반응형

반응형
  • 이미 가지고 있는 테이블을 기반으로 장고 마이그레이션이 필요할 경우 아래의 명령어로 테이블 스키마 기준 models 데이터를 생성 할 수 있다.
python manage.py inspectdb > models.py

 

반응형

+ Recent posts