GithubHelp home page GithubHelp logo

Comments (21)

xaizek avatar xaizek commented on June 1, 2024

pip3 install --user scandir (or sudo pip3 install scandir) doesn't help?

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

I edited the question. The scandir issue is resolved. Now the issue is

Traceback (most recent call last):
File "Lucas.py", line 44, in
import Code.Init
File "./Code/Init.py", line 5, in
from Code import Procesador
File "./Code/Procesador.py", line 6, in
from Code import AperturasStd
File "./Code/AperturasStd.py", line 1, in
import LCEngine4 as LCEngine
ImportError: No module named LCEngine4

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

Have you executed xcython_linux.sh? Mind that in 11.17 it's incorrectly uses version 2 of the engine so you might need to replace 2's with 4's in it. Or just use the latest commit, which does that.

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Nope I didnt run that command. My lucaschess folder doesn't have such a file. Please bear with me, i am quite naive in this, so please do bear with the follow up questions.

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

It's in LCEngine/ directory. Do

cd LCEngine
bash xcython_linux.sh

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Very kind of you to help. Here is the output when i executed that command.

rm: cannot remove 'LCEngine4.so': No such file or directory
Traceback (most recent call last):
File "./setup.py", line 4, in
from Cython.Build import cythonize
ImportError: No module named Cython.Build
x86_64
cp: cannot stat 'LCEngine4.so': No such file or directory
cp: cannot stat 'libirina.so': No such file or directory
cp: cannot stat 'LCEngine4.so': No such file or directory
cp: cannot stat 'libirina.so': No such file or directory

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

There is a list of dependencies here and Cython is one of them. Install it and other dependencies and run scripts again (just realized that you probably didn't build irina either if you didn't read those instructions):

cd LCEngine/irina
bash xmk_linux.sh
cd ..
bash xcython_linux.sh

Correct output of xcython_linux.sh script looks something like this (doesn't have to match exactly):

running build_ext
building 'LCEngine4' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c LCEngine4.c -o build/temp.linux-x86_64-2.7/LCEngine4.o
In file included from LCEngine4.c:614:0:
irina.h:16:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 void init_board();
 ^
irina.h:22:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int numMoves( );
 ^
gcc -pthread -shared build/temp.linux-x86_64-2.7/LCEngine4.o -L/usr/lib64 -lirina -lpython2.7 -o /home/xaizek/bin/lucaschess/LCEngine/LCEngine4.so
x86_64

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Thanks once again. Will come back soon with an update.

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

This is the output which i got.


rm: cannot remove 'LCEngine4.so': No such file or directory
Compiling LCEngine4.pyx because it changed.
[1/1] Cythonizing LCEngine4.pyx
/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/chandru1/lucaschess/LCEngine/LCEngine4.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
running build_ext
building 'LCEngine4' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kjnyAR/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c LCEngine4.c -o build/temp.linux-x86_64-2.7/LCEngine4.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kjnyAR/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kjnyAR/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC build/temp.linux-x86_64-2.7/LCEngine4.o -lirina -o /home/chandru1/lucaschess/LCEngine/LCEngine4.so
x86_64


from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

Looks like a success to me, does running LucasChess work now?

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

How to run? What should i execute?

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

While inside Linux directory do bash xlucas.sh.

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Nopes.


Traceback (most recent call last):
File "./Lucas.py", line 44, in
import Code.Init
File "./Code/Init.py", line 5, in
from Code import Procesador
File "./Code/Procesador.py", line 30, in
from Code import GestorRoutes
File "./Code/GestorRoutes.py", line 11, in
from Code import LibChess
File "./Code/LibChess.py", line 4, in
import chess
ImportError: No module named chess

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

Have you installed python-chess as per instructions?

sudo apt-get install python-chess

By the way, this is how to format output of commands:

```
put output here
```

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Yes. I have

sudo pip install python-chess

This is the command right?

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024
chandru1@chandru-hp:~$ sudo pip install python-chess
[sudo] password for chandru1: 
The directory '/home/chandru1/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/chandru1/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-chess
  Downloading https://files.pythonhosted.org/packages/3d/ed/ae1dbb45de32df04c9b2cdfa1802bd7509978da1ad245b3180276f5937a6/python-chess-0.24.2.tar.gz (140kB)
    100% |████████████████████████████████| 143kB 237kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-Xl_FAR/python-chess/setup.py", line 35, in <module>
        """)
    ImportError: You are installing python-chess on Python 2.
    
    Python 2 support has been dropped. Consider upgrading to Python 3, or using
    the 0.23.x branch, which will be maintained until the end of 2018.

This is what i got when i executed it.

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

There are multiple ways to install it and they can install different versions. Your command has failed because it's using version that's too new for Python2, this one should work fine (I installed this way):

sudo pip install python-chess==v0.23.11

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Yaaaaaaayyy! Working. I can't thank you enough. Thanks for the time and patience. A 1000 thanks wont suffice. Very happy.

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

Great, no problem. You want to also do this though or some engines won't work (file permissions aren't correct in the releases and in the repository):

chmod +x Engines/Linux64/komodo/Linux/komodo-10-linux
chmod +x Engines/Linux64/mccain/McCain-X3_x64_linux
chmod +x Engines/Linux64/stockfish/Linux/stockfish_10_x64

Don't forget to close this issue.

from lucaschess.

Arunachala-Ramana avatar Arunachala-Ramana commented on June 1, 2024

Sure. Will do so. Finally a last question and then i shall close the issue. Is it possible to expect Lucaschess as a .deb package in ubuntu like Pychess so that people can directly install via package manager and not struggle like how i did here :P?

from lucaschess.

xaizek avatar xaizek commented on June 1, 2024

Only if someone is willing to be its maintainer in Debian or at least write a package specification (maybe there is one somewhere). However, mind that Lucas isn't developing this version anymore. He's working on Lucas Chess (R), which might not build on Linux yet (I haven't tried it at all, but it was mentioned somewhere here).

from lucaschess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.