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

Python version not used during install #28

Closed
svmnotn opened this issue Mar 12, 2016 · 7 comments
Closed

Python version not used during install #28

svmnotn opened this issue Mar 12, 2016 · 7 comments

Comments

@svmnotn
Copy link

svmnotn commented Mar 12, 2016

I have both python 3.5 and 2.7 installed in my machine (Arch Linux) but whenever I run the cmake . command it always picks /usr/bin/python which links to 3.5.

Currently I just made /usr/bin/python to point into 2.7 but it would be better if the build script would pick the correct one.

@swolchok
Copy link
Contributor

Does af35863 fix this for you?

@svmnotn
Copy link
Author

svmnotn commented Mar 18, 2016

Sadly it does not. CMake still errors out saying:

CMake Error at CMakeLists.txt:8 (MESSAGE):
  Python 2 is required.

@swolchok
Copy link
Contributor

How about f4ec166?

@svmnotn
Copy link
Author

svmnotn commented Mar 18, 2016

All that did was add:

-- Found PythonInterp: /usr/bin/python (found suitable version "3.5.1", minimum required is "2")

on top of the previous error. I should say that I did try that before submitting the issue.

@swolchok
Copy link
Contributor

Interesting. I tried making my /usr/local/bin/python be python3 and it still found my python2 executable before asking, too.

@svmnotn
Copy link
Author

svmnotn commented Mar 18, 2016

For context when I run ls -Al | grep python inside of /usr/bin, it gives me

python -> python3
python2 -> python2.7
python2.7
python2.7-config
python2-config -> python2.7-config
python3 -> python3.5
python3.5
python3.5-config -> python3.5m-config
python3.5m
python3.5m-config
python3-config -> python3.5-config
python-config -> python3-config

@swolchok
Copy link
Contributor

Google suggests that this is a widespread problem on Arch with projects that use CMake and want python2. The suggested workaround is cmake -DPYTHON_EXECUTABLE=/path/to/python2.7. See e.g. https://hub.qgis.org/issues/5069 jckarter/clay#53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants