I'm attempting to use an existing install of proj.4 (libproj-dev) on Ubuntu 16.04 as the c library source for pyproj, but I'm having trouble determining the path that I need to set the PROJ_DIR
environment variable to. For my proj.4 install the folder that has the files 'espg', 'esri', 'nad27', etc. is /usr/share/proj
and I've set the environment variable to that path and then run:
the build succeeds, but based on the output that is generated I'm not sure that it's using my proj.4 install as it doesn't name the paths where library's files are located. Is there a way to check the proj.4 that pyproj is using? I've also tried setting PROJ_DIR
to /lib/
as the README suggests, and the build succeeds then as well, but in that case it seems even less likely that it would be using the previously installed proj.4 as none of the files are stored under /lib
rather they're all under /usr
. Here's the output from pip when PROJ_DIR
is set to /usr/share/proj
:
Collecting pyproj
1 location(s) to search for versions of pyproj:
* https://pypi.python.org/simple/pyproj/
Getting page https://pypi.python.org/simple/pyproj/
Looking up "https://pypi.python.org/simple/pyproj/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/pyproj/ HTTP/1.1" 200 666
Updating cache with response from "https://pypi.python.org/simple/pyproj/"
Caching b/c date exists and max-age > 0
Analyzing links from page https://pypi.python.org/simple/pyproj/
Found link https://pypi.python.org/packages/0d/db/5fa6fe77a2f04c8b7ffb9d1661587114145324199dd273e2d7079655cf77/pyproj-1.8.1.tar.gz#md5=1b28a593e5868e314cd07f4d291ab1a3 (from https://pypi.python.org/simple/pyproj/), version: 1.8.1
Found link https://pypi.python.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz#md5=027345e3c033fa400e0e64a1c80d34c9 (from https://pypi.python.org/simple/pyproj/), version: 1.9.5.1
Found link https://pypi.python.org/packages/3f/9c/bb7cbce5d5453066d63750399e6a74ef8a5e2d2d89c02e6d0ac7ce0ea8fe/pyproj-1.8.1a.tar.gz#md5=389fa3457d5332d54ff209afcea7ca4f (from https://pypi.python.org/simple/pyproj/), version: 1.8.1a
Found link https://pypi.python.org/packages/50/a6/87d081407287534106a38033daf8c00763a99f054bb3015423515e480e95/pyproj-1.9.4.tar.gz#md5=b0a060465b117dd6c1b37e14f22382aa (from https://pypi.python.org/simple/pyproj/), version: 1.9.4
Found link https://pypi.python.org/packages/cd/4e/0bcb33a08ba07f483dfcb8ffc58c02bb2883d14dc81d9da8c4da02efc1b5/pyproj-1.8.0.tar.gz#md5=d4aff8a45639ac64ebfc4d84ad72a869 (from https://pypi.python.org/simple/pyproj/), version: 1.8.0
Found link https://pypi.python.org/packages/e5/d5/bdbe10850da198238cb693019993827e920421eca5d662166f84f3928db6/pyproj-1.9.5.tar.gz#md5=3446a23f1c9de4827b31996ff213c5a3 (from https://pypi.python.org/simple/pyproj/), version: 1.9.5
Found link https://pypi.python.org/packages/f9/7f/ee337f570e4c3ef4593709dcb63e813c359184ede249c4f79b761186bd08/pyproj-1.9.3.tar.gz#md5=ad0ac0602b6373c4203b4d0774445694 (from https://pypi.python.org/simple/pyproj/), version: 1.9.3
Using version 1.9.5.1 (newest of versions: 1.8.0, 1.8.1, 1.9.3, 1.9.4, 1.9.5, 1.9.5.1)
Looking up "https://pypi.python.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz" in the cache
No cache entry available
"GET /packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz HTTP/1.1" 200 4424543
Downloading pyproj-1.9.5.1.tar.gz (4.4MB)
Downloading from URL https://pypi.python.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz#md5=027345e3c033fa400e0e64a1c80d34c9 (from https://pypi.python.org/simple/pyproj/)
99% |ββββββββββββββββββββββββββββββββ| 4.4MB 8.5MB/s eta 0:00:01 Updating cache with response from "https://pypi.python.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz"
Caching due to etag
100% |ββββββββββββββββββββββββββββββββ| 4.4MB 294kB/s
Running setup.py (path:/tmp/pip-build-hwoOXH/pyproj/setup.py) egg_info for package pyproj
Running command python setup.py egg_info
PROJ_DIR is set, using existing proj4 installation..
running egg_info
creating pip-egg-info/pyproj.egg-info
writing pip-egg-info/pyproj.egg-info/PKG-INFO
writing top-level names to pip-egg-info/pyproj.egg-info/top_level.txt
writing dependency_links to pip-egg-info/pyproj.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/pyproj.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/pyproj.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'src/*diff'
writing manifest file 'pip-egg-info/pyproj.egg-info/SOURCES.txt'
Source in /tmp/pip-build-hwoOXH/pyproj has version 1.9.5.1, which satisfies requirement pyproj from https://pypi.python.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz#md5=027345e3c033fa400e0e64a1c80d34c9
Building wheels for collected packages: pyproj
Running setup.py bdist_wheel for pyproj ... Destination directory: /tmp/tmpa4xXCApip-wheel-
Running command /home/ubuntu/venv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hwoOXH/pyproj/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpa4xXCApip-wheel- --python-tag cp27
PROJ_DIR is set, using existing proj4 installation..
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pyproj
copying lib/pyproj/datadir.py -> build/lib.linux-x86_64-2.7/pyproj
copying lib/pyproj/__init__.py -> build/lib.linux-x86_64-2.7/pyproj
running build_ext
building 'pyproj._proj' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/share/proj/include -I/usr/include/python2.7 -c _proj.c -o build/temp.linux-x86_64-2.7/_proj.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_proj.o -L/usr/share/proj/lib -L/usr/share/proj/lib64 -Wl,-R/usr/share/proj/lib -Wl,-R/usr/share/proj/lib64 -lproj -o build/lib.linux-x86_64-2.7/pyproj/_proj.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pyproj
copying build/lib.linux-x86_64-2.7/pyproj/datadir.py -> build/bdist.linux-x86_64/wheel/pyproj
copying build/lib.linux-x86_64-2.7/pyproj/_proj.so -> build/bdist.linux-x86_64/wheel/pyproj
copying build/lib.linux-x86_64-2.7/pyproj/__init__.py -> build/bdist.linux-x86_64/wheel/pyproj
running install_egg_info
running egg_info
writing lib/pyproj.egg-info/PKG-INFO
writing top-level names to lib/pyproj.egg-info/top_level.txt
writing dependency_links to lib/pyproj.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'lib/pyproj.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'src/*diff'
writing manifest file 'lib/pyproj.egg-info/SOURCES.txt'
Copying lib/pyproj.egg-info to build/bdist.linux-x86_64/wheel/pyproj-1.9.5.1-py2.7.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pyproj-1.9.5.1.dist-info/WHEEL
done
Stored in directory: /home/ubuntu/.cache/pip/wheels/85/dd/2f/d1ed07a507c7adb330cda0afcc96cae8e9abb4d85bbb788bdf
Removing source in /tmp/pip-build-hwoOXH/pyproj
Successfully built pyproj
Installing collected packages: pyproj
Successfully installed pyproj-1.9.5.1