Tag Archives: Pycharm Error

[Solved] Pycharm Error: Error running ‘XXX‘: Cannot run program “XXX\python.exe“ (in directory “XXX“)

Pycharm Error: Error running ‘XXX‘: Cannot run program “XXX\python.exe“ (in directory “XXX“)

 

Solution:

1. Look at the path when the error is reported. If it does not correspond to the environment, it indicates that there is a problem
2. Exit pycharm – find the project file, delete the. Idea hidden file – reopen the project

Pycharm Error: ImportError: No module named model_selection

first of all, I want to explain that I have this problem because I need to use train_ test_ Split method, the specific reference is:

from sklearn.model_selection import train_test_split

this error occurred:

ImportError: No module named model_selection

I checked on the Internet and found out the cause of the problem. One thing Dashen gave me was that there was a problem with my sklearn version, which was train before version v0.18_ test_ Split is placed in cross_ In the validation module, now, there are two solutions to this problem:

Method 1.

will:

from sklearn.model_selection import train_test_split

TO:

from sklearn.cross_validation import train_test_split

 

Method 2.

Upgrade sklearn to v0.18 or above

If your pychar compilation environment is Anaconda’s python, enter
in the anaconda prompt operation line

The CONDA update scikit learn command updates the version of sklearn. Before updating, you will be prompted to what version to update

Or enter PIP install — upgrade scikit learn to update the version
as well