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

Error while import opencog python libraries #125

Closed
Habush opened this issue Mar 19, 2018 · 10 comments
Closed

Error while import opencog python libraries #125

Habush opened this issue Mar 19, 2018 · 10 comments

Comments

@Habush
Copy link

Habush commented Mar 19, 2018

I have a docker image which uses the opencog-dev image as a base. After building the image successfully, I can't use the OpenCog python modules as I run into an import error. The docker files I am using to build the images can be found at this repo. As an example, running this simple script on the python command line raises an import error

from opencog.atomspace import AtomSpace
atomspace = AtomSpace()

The error:

ImportError: No module named opencog.atomspace

amebel added a commit to opencog/ocpkg that referenced this issue Mar 28, 2018
@amebel
Copy link
Contributor

amebel commented Mar 29, 2018

@Habush fixed by opencog/ocpkg#102

@amebel amebel closed this as completed Mar 29, 2018
@Habush
Copy link
Author

Habush commented Apr 3, 2018

@amebel The error is still occurring. Also the default python version is 2.7

@amebel
Copy link
Contributor

amebel commented Apr 4, 2018

@Habush In the docker containers it is python3. Do you want a python 2 version?

@mjsduncan
Copy link

mjsduncan commented Apr 4, 2018

the mozi back-end currently assumes opencog is built with python 2. is there a way to force atomspace/opencog to be built with python 2 in the new cmake?

@amebel
Copy link
Contributor

amebel commented Apr 4, 2018

@mjsduncan yes it is possible

@amebel
Copy link
Contributor

amebel commented Apr 4, 2018

@Habush @mjsduncan the opencog/X images are meant only for development and not for production systems

@linas
Copy link
Member

linas commented Apr 4, 2018

If a system has both python2 and python3 installed. does opencog build both versions? It probably should; they could be build in different directories, adn installed in different install locations.

@amebel
Copy link
Contributor

amebel commented Apr 4, 2018

@linas CMake is not configured to do that presently, but yes that is possible.

@mjsduncan
Copy link

fyi we've decided to bite the bullet and port mozi to python 3.

@linas
Copy link
Member

linas commented Apr 7, 2018

porting to python3 should not be hard, there are several great "howto" pages out there -- its mostly just tedious, like adding extra parens to print statements, etc.

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

4 participants