Error running example given in "Quick start"
I basically followed the steps given here (inside a virtual environment): https://github.com/PaddlePaddle/Paddle/blob/develop/doc/getstarted/index_en.rst
- I used pip to install:
pip install paddlepaddle - Then I started running the "housing" example line by line in Python interpreter, and get the following error:
>>> import paddle.v2 as paddle
>>> paddle.init(use_gpu = False, train_count = 1)
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
When I run the program with "-v" option (as in python -v housing.py): I get the following log (truncated):
.
.
.
# /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/inference.pyc matches /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/inference.py
import paddle.v2.inference # precompiled from /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/inference.pyc
# /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/minibatch.pyc matches /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/minibatch.py
import paddle.v2.minibatch # precompiled from /Users/goyalsiddharth/pad/lib/python2.7/site-packages/paddle/v2/minibatch.pyc
import py_paddle # directory /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle
# /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/__init__.pyc matches /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/__init__.py
import py_paddle # precompiled from /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/__init__.pyc
# /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/util.pyc matches /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/util.py
import py_paddle.util # precompiled from /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/util.pyc
# /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/swig_paddle.pyc matches /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/swig_paddle.py
import py_paddle.swig_paddle # precompiled from /Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/swig_paddle.pyc
dlopen("/Users/goyalsiddharth/pad/lib/python2.7/site-packages/py_paddle/_swig_paddle.so", 2);
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
Maybe this suggests issues with _swig_paddle.so ?
I think this problem arises (at least for me) if I use python from anaconda. When switching back to default python in the system, I get paddle working, and also this example is running ~with a minor modification:~
Line 2: paddle.init(use_gpu = False, trainer_count = 1)
@sidgoyal78
line2: paddle.init(use_gpu=False, trainer_count=1) trainer_count not train_count