question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lwassercommented, Nov 7, 2019

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!!

0reactions
MartinFalaticcommented, Nov 7, 2019

Ubuntu Bionic is certainly not EOL nor is it using Pip >= 10, and upgrading to a newer pip brings its own problems. Is it necessary to have a breaking change for a minor point release?

https://packages.ubuntu.com/bionic/python3-pip

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyProj package installation PROJ_DIR variable - Stack Overflow
Please set PROJ_DIR variable error. COMMAND. $ pipenv install pyproj. I have also tried pipenv git+https://github.com/jswhit/pyproj.git ...
Read more >
Installation - pyproj 3.5.0.dev0 documentation - GitHub Pages
This enables installing pyproj when the PROJ executables are not present but the header files exist. PROJ_DIR#. This is the path to the...
Read more >
Unable to install proj related Python packages in a Linux ...
Please set the PROJ_DIR variable. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html ---------- ...
Read more >
Solving pyproj install error — ERROR: PROJ_DIR dir not ...
ERROR: PROJ_DIR dir not found. Please set PROJ_DIR. you need to try to install $ brew install proj. then try again $ pip...
Read more >
Python – PyProj package installation PROJ_DIR variable
packagepipprojpyprojpython. I am attempting to install pyproj , although am getting a Proj executable not found. Please set PROJ_DIR variable error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found