Azure App Service에 pip 사용 불가 패키지 설치
입문
Python 응용 프로그램을 Azure App Service에 배치할 때 wheel 컴파일이 필요한 패키지의 설치가 매우 어렵기 때문에 저는 필기


그리고 이번에는 다음 환경에 패키지를 설치했습니다.
배포 오류
휠이 필요한 패키지를 설치할 때 몇 번공식 문서을 배치하든 다음과 같은 오류가 발생하여 곤란합니다.이번에 우리는 이 잘못을 없앨 것이다.
remote: Running setup.py install for pyodbc
remote: building 'pyodbc' extension
remote: error: Unable to find vcvarsall.bat
remote: Complete output from command D:\home\site\wwwroot\env\Scripts\python.exe -c "import setuptools, tokenize;__file__='D:\\home\\site\\wwwroot\\env\\build\\pyodbc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record D:\local\Temp\pip-okpfh2du-record\install-record.txt --single-version-externally-managed --compile --install-headers D:\home\site\wwwroot\env\include\site\python3.4:
remote: running install
remote:
remote: running build
remote:
remote: running build_ext
remote:
remote: building 'pyodbc' extension
remote:
remote: error: Unable to find vcvarsall.bat
remote:
remote: ----------------------------------------
wheel을 사용하여 로컬 구축 및 파일 이름 바꾸기
Azure App Service는 샌드박스 환경입니다.따라서 pip로 C나 C++로 포장된 라이브러리를 설치할 수 없습니다.이 패키지를 설치하려면 wheel을 사용하여 미리 구축해야 합니다.또한 구축된 Python 환경은 App Service와 동일한 플랫폼/아키텍처/버전이 있어야 합니다.즉, Windows에서 Python 2.732bit 또는 3.432bit을 요구합니다.또한 C++의 환경은 Python 2.7용과 Python 3용에서도 다르니 주의하십시오.환경이 준비되면 다음 명령을 실행하십시오.
python -m pip install --upgrade pip
pip install wheel
pip wheel azure-storage
pip wheel django-pyodbc-azure
상술한 명령을 실행할 때.whl 파일을 생성한 후 배치할 프로그램의 루트 디렉터리에 wheelhouse 폴더를 만들고 복사합니다.이어서 복사했습니다.부분 whl 파일의 이름을 바꿉니다.가장 큰 걸림돌이지만 App Service 배포는
none
태그 
cryptography-1.5.2-cp34-cp34m-win32.whl => cryptography-1.5.2-cp34-none-win32.whl
의 이름을 cp34m
형식으로 변경합니다.이번에 설치된 패키지에서cryptography와cffi,pyodbc는 이름을 바꾸는 대상이 되었다.나와 다른 패키지가 설치되어 있어도whl 파일에 none가 포함되지 않으면 이상하다고 생각하십시오.requirements.txt 수정
그리고requirements.txt의 시작에 추가
none
.이제 Git 배포 시 wheelhouse에서 패키지를 검색할 수 있습니다.또한requirements.txt는 아래와 같다.--find-links wheelhouse
django==1.11
azure-storage==0.34.3
django-pyodbc-azure==1.11
그런 다음 Git으로 변경 사항을 추출하면 설치 환경입니다.마지막
Azure App Service는 편리하지만 소프트웨어 패키지를 설치하는 데 문제가 있습니다...C# 또는 Node.js로 만든 응용 프로그램의 배치는 상당히 간단한 인상을 준다.
Reference
이 문제에 관하여(Azure App Service에 pip 사용 불가 패키지 설치), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/YuichiNukiyama/items/ad125213c44b4100764b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)