On my 3.7 venv xgboost was working fine, but when I changed to python 3.8 venv inheriting all of the packages from 3.7 venv, the interpreter can't find the module. Also I get error while trying to install it via PyCharm settings:
ERROR: Command errored out with exit status 1: 'C:\Users\exemed\PycharmProjects\test2\venv\venv38\Scripts\python.exe'
-u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\exemed\\AppData\\Local\\Temp\\pycharm-packaging\\xgboost\\setup.py'"'"';
__file__='"'"'C:\\Users\\exemed\\AppData\\Local\\Temp\\pycharm-packaging\\xgboost\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);
code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');
f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\exemed\AppData\Local\Temp\pip-record-3_ddvcjb\install-record.txt'
--single-version-externally-managed --compile --install-headers 'C:\Users\exemed\PycharmProjects\test2\venv\venv38\include\site\python3.8\xgboost'
Check the logs for full command output.