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

Update cmake configuration for disabling builds against python 3 #12

Merged
merged 2 commits into from
Sep 5, 2018
Merged

Update cmake configuration for disabling builds against python 3 #12

merged 2 commits into from
Sep 5, 2018

Conversation

amebel
Copy link

@amebel amebel commented Sep 5, 2018

To use Python2 only from the build directory run the following
rm CMakeCache.txt && cmake -DCMAKE_DISABLE_FIND_PACKAGE_Python3Interp=TRUE ..

@amebel amebel merged commit 01019cb into singnet:master Sep 5, 2018
@amebel amebel deleted the cmake-python branch September 5, 2018 09:48
@ferrouswheel
Copy link

This forces people to use Python 3.4 because you've changed to explicitly calling nosetests-3.4 :-(

The cmake variable to disable Python 3 detection could also be better named (unless this is an inbuilt variable provided by CMake), and probably should be added to the build documentation.

@amebel
Copy link
Author

amebel commented Sep 6, 2018

Installing using pip3, nose executable is called nosetests-3.4 not nosetests3.

It is inbuilt.

Done https://wiki.opencog.org/w/Building_OpenCog#Building

@ferrouswheel
Copy link

ferrouswheel commented Sep 6, 2018

If pip3 points to a pip installed with Python 3.4 then yeah, it will install nosetests-3.4.

Ubuntu 18.04 uses Python 3.6, so when you use pip3 to install nosetests you won't have nosetests-3.4. A lot of our SNet services rely on python 3.6 for async/await functionality, so if anyone is working on OpenCog and SNet, then this will probably cause issues for them.

Before I upgraded to 18.04 I had both Python3.4 and Python3.6 installed on my system. With the cmake config in this PR, it would find Python3.6 as the interpreter, but it would use nosetests from 3.4 - potentially introducing confusing errors.

I think the ideal solution would be to make sure nosetests matches the version of the python interpreter that was previously found.

@amebel
Copy link
Author

amebel commented Sep 6, 2018

I had tested against python 3.5.2 in ubuntu 16.04 container, and just tested against python 3.6.5 in ubuntu 18.04 container, & python 3.6.6 in conda, in all cases it is nosetests-3.4. Is there some option in pip that gets(or renames) nosetest-3.5/3.6?

@ferrouswheel
Copy link

ferrouswheel commented Sep 6, 2018

Wow, I just checked on an Ubuntu 16.04 box and even though I'm installing nose 1.3.7 with python 3.5 it still calls it nosetests-3.4!

I guess we discovered a bug with nosetests distribution.

I found this issue nose-devs/nose#1009 but it's from 2016. I've updated it with why it's gone wrong (it's due to it being packaged as a whl)

@vsbogd
Copy link
Member

vsbogd commented Sep 6, 2018

I don't have nosetests-3.4 and have nosetests3 instead probably because I don't use pip, just installed python3-nose in Ubuntu 18.

@vsbogd
Copy link
Member

vsbogd commented Sep 6, 2018

I see that README.md doesn't describe how to install python to build Atomspace properly. I think it makes sense add this information to the documentation.

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

Successfully merging this pull request may close these issues.

3 participants