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

undefined symbol: _Py_ZeroStruct #13

Closed
ricoj opened this issue Dec 20, 2016 · 2 comments
Closed

undefined symbol: _Py_ZeroStruct #13

ricoj opened this issue Dec 20, 2016 · 2 comments

Comments

@ricoj
Copy link

ricoj commented Dec 20, 2016

Hi, when I follow the instructions from https://github.com/deepmind/lab to install lab at ubuntu 16.04, I get a "undefined symbol: _Py_ZeroStruct" error after executing the following command:

bazel run :python_module_test --define headless=glx

The full command line output is:

INFO: Found 1 target...
Target //:python_module_test up-to-date:
  bazel-bin/python_module_test
INFO: Elapsed time: 0.230s, Critical Path: 0.01s

INFO: Running command line: bazel-bin/python_module_test
Traceback (most recent call last):
  File "/home/rico/.cache/bazel/_bazel_rico/4b96fd176693dd396977e881a84a79f8/execroot/lab/bazel-out/local-fastbuild/bin/python_module_test.runfiles/org_deepmind_lab/python/dmlab_module_test.py", line 26, in <module>
    import deepmind_lab
ImportError: /home/rico/.cache/bazel/_bazel_rico/4b96fd176693dd396977e881a84a79f8/execroot/lab/bazel-out/local-fastbuild/bin/python_module_test.runfiles/org_deepmind_lab/deepmind_lab.so: undefined symbol: _Py_ZeroStruct
ERROR: Non-zero return code '1' from command: Process exited with status 1.
@heiner
Copy link

heiner commented Dec 20, 2016

Hey Rico, can you make sure you're using Python 2.7 and the development files you have installed are for that version?

On my machine:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
$ python --version
Python 2.7.12

@ricoj
Copy link
Author

ricoj commented Dec 20, 2016

Ahh, my Anaconda installation of python3 got in the way. "python" linked to python3 rather than python2. Removing the path to Anaconda in my ~/.bashrc solved the problem.

Thank you, Heinrich, for your quick and helpful reply!

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