You are not logged in.

#1 2013-11-28 12:13:55

enedene
Member
From: Zagreb
Registered: 2010-07-13
Posts: 25
Website

Problems installing python-chess

I need to install python-chess package:
https://pypi.python.org/pypi/python-chess

The author states the following is needed for installation:

Building

libboost-regex-dev and libboost-python-dev are required.

I assume that he's talking about ubuntu based systems. I have boost installed, but am not sure do I need something else:

pacman -Ss boost
extra/boost 1.54.0-4 [installed]
    Free peer-reviewed portable C++ source libraries - Development
extra/boost-libs 1.54.0-4 [installed]
    Free peer-reviewed portable C++ source libraries - Runtime
community/boost-build 2.0_m12-5 [installed]
    Boost build system

During installation, using easy_install I get the following warning, but it seems to install ok:

easy_install --user python-chess
Searching for python-chess
Reading https://pypi.python.org/simple/python-chess/
Best match: python-chess 0.0.5
Downloading https://pypi.python.org/packages/source/p/python-chess/python-chess-0.0.5.tar.gz#md5=456efb47a1431c16472b27063269e85b
Processing python-chess-0.0.5.tar.gz
Writing /tmp/easy_install-skh87f/python-chess-0.0.5/setup.cfg
Running python-chess-0.0.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-skh87f/python-chess-0.0.5/egg-dist-tmp-xfxhpk
Not SVN Repository
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]                                                                                                                                                           
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++                                                                                                                                                                                 [enabled by default]
zip_safe flag not set; analyzing archive contents...
__pycache__.libchess.cpython-33: module references __file__
Adding python-chess 0.0.5 to easy-install.pth file
Installing ecotool.py script to /home/ed/.local/bin

Installed /home/ed/.local/lib/python3.3/site-packages/python_chess-0.0.5-py3.3-linux-x86_64.egg
Processing dependencies for python-chess
Finished processing dependencies for python-chess

Finally, it seems that installation is finished but I get an error:

import chess
import chess                                                                                                                                                                                                                                                       
---------------------------------------------------------------------------                                                                                                                                                                                                    
ImportError                               Traceback (most recent call last)                                                                                                                                                                                                    
<ipython-input-1-31dd7659fda0> in <module>()                                                                                                                                                                                                                                   
----> 1 import chess                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                               
/home/ed/.local/lib/python3.3/site-packages/python_chess-0.0.5-py3.3-linux-x86_64.egg/chess/__init__.py in <module>()                                                                                                                                                          
     28                                                                                                                                                                                                                                                                        
     29 # Import from libchess.                                                                                                                                                                                                                                                
---> 30 from libchess import START_FEN                                                                                                                                                                                                                                         
     31 from libchess import opposite_color                                                                                                                                                                                                                                    
     32 from libchess import Square                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                               
ImportError: /usr/lib/libboost_python.so.1.54.0: undefined symbol: PyClass_Type     

Btw, the library works fine with python 2.7.

Last edited by enedene (2013-11-28 14:10:33)

Offline

Board footer

Powered by FluxBB