woonizzooni

[PyProj] Proj executable not found. Please set PROJ_DIR variable. 본문

Programming/Python

[PyProj] Proj executable not found. Please set PROJ_DIR variable.

woonizzooni 2019. 8. 22. 18:44

Windows10 python에서 PyProj모듈 설치 불가 현상 관련건.

 

 

다음과 같이 설치하려고 하면 "ERROR: Proj executable not found. Please set PROJ_DIR variable."

(geo_test) PS D:\Workspace\VSCode> pip install pyproj
Collecting pyproj
  Using cached https://files.pythonhosted.org/packages/49/94/06c20b7f65a0efc31da7c734ea4c9385a3b26e5aec619a5b83383dffed93/pyproj-2.3.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\workspace\vscode\geo_test\scripts\python.exe' 'd:\workspace\vscode\geo_test\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\xxxx\AppData\Local\Temp\tmpnivso3tk' 
      cwd: C:\Users\xxxxxx\AppData\Local\Temp\pip-install-5hn8d_zn\pyproj
  Complete output (1 lines): 
  Proj executable not found. Please set PROJ_DIR variable.

  ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\workspace\vscode\geo_test\scripts\python.exe' 'd:\workspace\vscode\geo_test\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\xxxx\AppData\Local\Temp\tmpnivso3tk' Check the logs for full command output.

 

C:\Users\xxxx>pip install pyproj
Collecting pyproj
  Using cached https://files.pythonhosted.org/packages/49/94/06c20b7f65a0efc31da7c734ea4c9385a3b26e5aec619a5b83383dffed93/pyproj-2.3.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Complete output from command 'C:\Users\xxxx\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' 'C:\Users\xxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\xxxx\AppData\Local\Temp\tmpxkfncqhd':
  ERROR: Proj executable not found. Please set PROJ_DIR variable.
  ----------------------------------------
ERROR: Command "'C:\Users\xxxx\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' 'C:\Users\xxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\xxxx\AppData\Local\Temp\tmpxkfncqhd'" failed with error code 1 in C:\Users\xxxx\AppData\Local\Temp\pip-install-ptwv4_3c\pyproj

 

 

MacOS/Linux환경에서는 이와 같은 현상이 발생하지 않았는데, 아이 귀찮네.

https://pyproj4.github.io/pyproj/dev/installation.html 를 살펴보니 'PROJ_DIR" 변수 설정 관련 내용이 설명되어 있는데

Windows환경에서는 /usr/local/처럼 경로도 쉽지 않거니와 쫌 감이 안온다.

 

 

그러던 중, 이전 버전(?)으로 지정 설치하면 문제 없이 되네.

> pip install pyproj==2.2.2

(geo_test) PS D:\Workspace\VSCode> pip install pyproj==2.2.2
Collecting pyproj==2.2.2
  Using cached https://files.pythonhosted.org/packages/c4/ef/1519640730a7a3f783b32ed56c5f9d292d934da686da8e6aeaf52d47cbb0/pyproj-2.2.2-cp37-cp37m-win_amd64.whl
Installing collected packages: pyproj
Successfully installed pyproj-2.2.2

 

 

 

 

[참고]

Python interface to PROJ (cartographic projections and coordinate transformations library).

https://pypi.org/project/pyproj/

https://github.com/pyproj4/pyproj

 

pyproj 2.3.0

https://pyproj4.github.io/pyproj/dev/installation.html

https://github.com/OSGeo/PROJ

 

Comments