Need some help understanding PyD

xtreak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 10 20:33:24 PST 2017


On Monday, 9 January 2017 at 06:22:14 UTC, Saurabh Das wrote:
> PS: Noticed something off. My python installation is 3.4.3:
> Python 3.4.3 (default, Sep 14 2016, 12:36:27)
> [GCC 4.8.4] on linux
>
> However when I run:
>     context.py_stmts("import sys");
>     context.py_stmts("print(sys.version)");
>
> I get:
> 3.4.0 (default, Apr 11 2014, 13:08:40)
> [GCC 4.8.2]
>
>
> Also, when I import numpy from python3, it works, but if I do:
>     context.py_stmts("import numpy");
>
> I get this error:
> pyd.exception.PythonException at source/app.d(20):
> ImportError: 
> /usr/lib/python3.4/lib-dynload/_ctypes.cpython-34m-x86_64-linux-gnu.so: undefined symbol: _PyTraceback_Add
> ----------------

I think you need to upgrade Python. I googled "_PyTraceback_Add" 
and got this 
http://stackoverflow.com/questions/33223713/python-ctypes-import-error-in-virtualenv . Also refer to this comment http://stackoverflow.com/questions/33223713/python-ctypes-import-error-in-virtualenv#comment54266298_33223713 . Hope this helps.


More information about the Digitalmars-d-learn mailing list