pyproj: Linux pip install gives "Proj executable not found. Please set PROJ_DIR variable."

Installation method/steps

pip install pyproj

Environment Information

  • pyproj version you are attempting to install: 2.4.1 (this is not an issue for 2.4.0)
  • Tested with 3.5 and 3.6
  • Tested with Linux Mint 18 and Ubuntu Xenial

Error

 Running setup.py (path:/tmp/pip-install-qfelb_w6/pyproj/setup.py) egg_info for package pyproj
    Running command python setup.py egg_info
    Proj executable not found. Please set PROJ_DIR variable.

Since 2.4.1 release pip install won’t work unless you have a more recent version of pip. pip 18.1 for example will fail because it refuses to download the wheel packages and then will try to compile the sources.

Skipping link https://files.pythonhosted.org/packages/a5/b3/a3e00996681ef6e2e19cf367ff57e5e83ad8357f398b0cb71dab5cc8b756/pyproj-2.4.1-cp35-cp35m-manylinux2010_x86_64.whl#sha256=a1422da59673ca5bf56d89cf8e2a3cb2c9868bea27bbee6600ae603d322316a8 
 (from https://pypi.org/simple/pyproj/) (requires-python:>=3.5); it is not compatible with this Python

Fix

The solution is to upgrade pip to a later version (pip install --upgrade pip)

You can close this issue if you think this is not a bug worth fixing. I created it mostly so users with the same issue may hopefully find this.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 15 (11 by maintainers)

Most upvoted comments

hey @snowman2 ok thank you!! i figured it out. it was a pyproj error associated with tox needing the pip dependency too!! for anyone else running into this - the fix is as easy as this:

https://github.com/earthlab/earthpy/pull/452/files#diff-b91f3d5bd63fcd17221b267e851608e8R21

essentially specifying pip>=19.0 as a dep in the tox envt as well as the deps file (if things are setup the way we have them setup for you that is!!). thank you again for this issue! it helped me resolve things!!