intel-extension-for-transformers icon indicating copy to clipboard operation
intel-extension-for-transformers copied to clipboard

Installation is broken for python3.11

Open ei-grad opened this issue 1 year ago • 5 comments

  ModuleNotFoundError: No module named 'cmake'
  ModuleNotFoundError: No module named 'cpuinfo'

ei-grad avatar Nov 23 '23 14:11 ei-grad

@ei-grad Could you share the cmd to install ITREX? It's great if you could provide the whole log with this error.

NeoZhangJianyu avatar Nov 24 '23 06:11 NeoZhangJianyu

https://stackoverflow.com/questions/58992376/no-module-named-cmake Hi @ei-grad can you check cmake as the link above?

airMeng avatar Dec 01 '23 08:12 airMeng

I have a similar issue running Windows 11, tried installing both binary and from source. System info: Windows 11 Enterprise python 3.11.7 cmake 3.27.9 pip 23.3.1

Error message (edited): Traceback (most recent call last): site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() site-packages\setuptools\build_meta.py", line 480, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 26, in ModuleNotFoundError: No module named 'cmake'

DavidWinge avatar Dec 08 '23 14:12 DavidWinge

It is a known problem that we cannot specify required version of torch for wheel-building so that build-time requirements must be installed manually when build from source (including the sdist, that's why the problem don't exist on Linux where we are providing wheel package).

To install the build-time requirements, try running pip install -r https://raw.githubusercontent.com/intel/intel-extension-for-transformers/main/requirements.txt beforehand.

(And then windows will complain about the long path problem in my experience. Again it is a known problem which will be fixed after a new release of ninja). In that case, you have to build from source (in a directory with short name). e.g.:

cd "c:\"
git clone https://github.com/intel/intel-extension-for-transformers.git itrex
cd itrex
pip install -r requirements.txt
pip install -v .

DDEle avatar Dec 12 '23 04:12 DDEle

Hi, I will close this issue if you don't have concerns

kevinintel avatar Jan 24 '24 12:01 kevinintel