0

I was trying to install the python chess module and kept getting the same error:
ModuleNotFoundError: No module named 'chess'

I looked at some other code and noticed the same problem of not importing the module even though it worked before (in this case it was from sklearn.model_selection import train_test_split).
I figured the problem was that I put all my code in a new folder. Once I took out all of my code from this folder it was able to work, but the chess module still didn't. This made me think that it must be an issue with the path.
Since I use quite a few folders in order to organize my work. How do I fix this?
I don't want to take out all of my code from every folder I have.

I am using VSCode, and I have already installed the chess module, several times, using pip, pip3, python -m install pip, conda, in the command prompt, terminal in VSCode, and miniconda.
So it is not an installation problem.

3
  • which IDE you use VSCODE or PYCHARM Commented Jul 26, 2020 at 6:50
  • are u using virtualenv? Commented Jul 26, 2020 at 6:50
  • Can you try out which pip and show the result? Commented Jul 26, 2020 at 7:45

1 Answer 1

1

You can install module manually,

  1. pip install python-chess

Run this command in virtual environment, this will install python chess module

Sign up to request clarification or add additional context in comments.

2 Comments

I did not mention this, but I had already done this, and it did not work. I had also done around a dozen different version of this, either using conda, pip3, pip, python, doing it in terminal and it still did not work
Then must be you are using old version of chess-bot. You should take updated code of chess-bot. Because Python already dropped few chess modules which was working in old code. I've an example dropped module - python chess-uci module comes under python chess module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.