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.
1 Answer
You can install module manually,
pip install python-chess
Run this command in virtual environment, this will install python chess module
2 Comments
cheestick
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
which pipand show the result?