hydra
hydra copied to clipboard
Possible Python 3.6 bug
First and foremost, thank you for an awesome tool.
I have hydra installed using pip install hydra in virtualenv for both Python 3.5 and Python 3.6. It works great on the former, but I am having some trouble on the latter.
[jonathfe:~/onco/binding] [.py36] jf_py353(1)* ± .py3/bin/python3.5 -c "import hydra"
[jonathfe:~/onco/binding] [.py36] jf_py353(1)* ± .py36/bin/python3.6 -c "import hydra"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/jonathfe/onco/binding/.py36/lib/python3.6/site-packages/hydra.py", line 1, in <module>
import _hydra
ImportError: /home/jonathfe/onco/binding/.py36/lib/python3.6/site-packages/_hydra.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf
Any ideas as to what is going on here?
Googling for PyFPE_jbuf, gives me for example:
- https://stackoverflow.com/questions/36190757/numpy-undefined-symbol-pyfpe-jbuf
- https://github.com/scikit-learn/scikit-learn/issues/7542
Both of those sounds like the root cause is multiple installations of cython/python/pip/conda, $PATH or include path mix-ups. Maybe that can help you to diagnose the problem further.
I do not think that is the problem.
The installation environment I installed Hydra in is clean. Only pip install hydra has been run:
[jonathfe:~/onco/binding] [.py36] $ .py36/bin/pip freeze
Hydra==2.5
I do not use Conda, only Virtualenv.
In a clean docker container, installing Hydra for Python 3.6 works here ($ is my local shell, # is the root shell inside the docker container):
$ docker pull python:3.6-slim
$ docker run -it --rm python:3.6-slim bash
# apt-get update
# apt-get install -y gcc
... lots of output...
# pip install Hydra
Collecting Hydra
Downloading Hydra-2.5.tar.gz (82kB)
100% |████████████████████████████████| 92kB 1.4MB/s
Building wheels for collected packages: Hydra
Running setup.py bdist_wheel for Hydra ... done
Stored in directory: /root/.cache/pip/wheels/9c/57/ff/658a5684f935285084ee9106d738c12aa2131f68f3eaa1a76d
Successfully built Hydra
Installing collected packages: Hydra
Successfully installed Hydra-2.5
# python -c 'import _hydra; print(_hydra.__file__)'
/usr/local/lib/python3.6/site-packages/_hydra.cpython-36m-x86_64-linux-gnu.so
# ldd `python -c 'import _hydra; print(_hydra.__file__)'`
linux-vdso.so.1 (0x00007ffe96169000)
libpython3.6m.so.1.0 => /usr/local/lib/libpython3.6m.so.1.0 (0x00007f0b80d1c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0b80aff000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0b80753000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0b8054f000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f0b8034c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0b8004a000)
/lib64/ld-linux-x86-64.so.2 (0x0000558f9552e000)
I've tested docker and conda container and there it seems to work. But native python and virtualenv is a no-go.
For what it is worth, I am running Ubuntu 17.04. and python version 3.6.1.