SwissArmyTransformer
SwissArmyTransformer copied to clipboard
Window 安装错误
尝试安装时候出现以下错误
PS D:\deeplearning\VisualGLM-6B> pip install SwissArmyTransformer>=0.4.4
Collecting SwissArmyTransformer>=0.4.4
Obtaining dependency information for SwissArmyTransformer>=0.4.4 from https://files.pythonhosted.org/packages/91/b9/44a3e9cc0116a3ebf8b60f0ef67340ca22c195e37b9d8f951a37e114f300/SwissArmyTransformer-0.4.4-py3-none-any.whl.metadata
Using cached SwissArmyTransformer-0.4.4-py3-none-any.whl.metadata (10 kB)
Requirement already satisfied: torch in c:\python311\lib\site-packages (from SwissArmyTransformer>=0.4.4) (2.0.1+cu118)
Collecting deepspeed (from SwissArmyTransformer>=0.4.4)
Using cached deepspeed-0.10.0.tar.gz (836 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
[WARNING] Unable to import torch, pre-compiling ops will be disabled. Please visit https://pytorch.org/ to see how to properly install torch on your system.
[WARNING] unable to import torch, please install it if you want to pre-compile any deepspeed ops.
DS_BUILD_OPS=1
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "D:\TMP\pip-build-env-94s77i31\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\TMP\pip-build-env-94s77i31\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "D:\TMP\pip-build-env-94s77i31\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\TMP\pip-build-env-94s77i31\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 130, in <module>
AssertionError: Unable to pre-compile ops without torch installed. Please install torch before attempting to pre-compile ops.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
但是实际上torch的已经安装了的
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'2.0.1+cu118'