Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Wim-De-Clercq opened this issue Nov 7, 2019 · 15 comments · Fixed by pyproj4/pyproj-wheels#19 or #479
Labels
installation-issues Issue related to installation problems.

Comments

@Wim-De-Clercq
Copy link

Wim-De-Clercq commented Nov 7, 2019

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.

@Wim-De-Clercq Wim-De-Clercq added the installation-issues Issue related to installation problems. label Nov 7, 2019
@Wim-De-Clercq Wim-De-Clercq changed the title Linux pip install Proj executable not found. Please set PROJ_DIR variable. Linux pip install gives "Proj executable not found. Please set PROJ_DIR variable." Nov 7, 2019
@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

This is likely related to using manylinux2010 wheels with 2.4.1

@jorisvandenbossche
Copy link
Contributor

@snowman2 I suppose it's possible with multibuild to still build both manylinux1 and manylinux2010 wheels and upload both?

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

According to: pypa/manylinux#179 (comment)

It seems it should work with pip 10.x. I don't think that is too unreasonable of a minimum version of pip to use to install pyproj. Or are there reasons why that would be problematic?

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

Hmm, that's not very true. Need pip>=19.0.0 for it to work.

@jorisvandenbossche
Copy link
Contributor

Apart from the pip version, there will also just be OSes that are too old for manylinux2010 (but don't know the exact requirements, not sure if the "2010" is a proper indicator)

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

Apart from the pip version, there will also just be OSes that are too old for manylinux2010 (but don't know the exact requirements, not sure if the "2010" is a proper indicator)

According to: pypa/manylinux#179 (comment), "most of linux flavors that came out before 2010 are now EOL". So, if their maintainers aren't supporting them, then I am not sure if we should be supporting them either.

@Wim-De-Clercq
Copy link
Author

I had this issue on travis by the way. Default distro is Xenial there. And default pip 18.1.

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

I had this issue on travis by the way. Default distro is Xenial there. And default pip 18.1.

Yes, you will need pip>=19.0.0

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

I suppose it's possible with multibuild to still build both manylinux1 and manylinux2010 wheels and upload both?

I guess this is likely the best path forward if it works.

@jorisvandenbossche
Copy link
Contributor

Yes, the old distros is probably as you quoted not really a problem. Old pip versions seems more annoying (AFAIK there is no good way to message to the users of "hey you should upgrade pip to ensure to install pyproj wheels").

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

Old pip versions seems more annoying (AFAIK there is no good way to message to the users of "hey you should upgrade pip to ensure to install pyproj wheels").

I guess I could add a message in the setup.py that says if you want manylinux2010 wheels, update to `pip>=19.0' if the install fails and they are on Linux.

Current plan:

  1. Update docs to say if you want manylinux2010 update to pip 19+
  2. Update setup.py
  3. Upload manylinux1 for 2.4.1

@lwasser
Copy link

lwasser commented Nov 7, 2019

hey @snowman2 i'm so happy i found this issue as i started running into this - this week - with our travis build. I'm noticing it works on python 3.5, 3.6 but fails again on 3.7 . essentially i added pip >=19.0 as a dep to my envt setup.
pr here: https://github.com/earthlab/earthpy/pull/452/files
travis error: https://travis-ci.org/earthlab/earthpy/jobs/608881106#L1172
is there anything else that i can test for python 3.7 or is my fix or forcing pip>19.0 incomplete?
many thanks.

@snowman2
Copy link
Member

snowman2 commented Nov 7, 2019

@lwasser it seems that fixed your pyproj issues. The build seems to be failing for a different reason now.

@MartinFalatic
Copy link

MartinFalatic commented 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

@lwasser
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation-issues Issue related to installation problems.
Projects
None yet
5 participants