microsoft / TransformerCompression

For releasing code related to compression methods for transformers, accompanying our publications
MIT License
354 stars 31 forks source link

can't install slicegpt using "pip install -e." on CPU platform #126

Closed JCDemon closed 3 months ago

JCDemon commented 5 months ago

The problem is stated in the title, here is the error detail when I try "pip install -e.":

Defaulting to user installation because normal site-packages is not writeable Obtaining file:///home/ubuntu/TransformerCompression Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [3 lines of output] WARNING setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section running egg_info error: Cannot update time stamp of directory 'src/transformercompression.egg-info' [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 editable 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.

I also tried "sudo pip install -e.", but still gets error:

ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/ubuntu/TransformerCompression (A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)

some related packages version: pip: 23.3.1 datasets : 2.16.0 setuptools: 68.2.2

The weird thing is that I'm ok to use slicegpt on anaconda (same python version, same pip version, and same setuptools version), but when I tried to install slicegpt on another server installed with miniconda, it failed.

nailimixaM commented 5 months ago

@PocherninaElena @myshkov @msdmkats @LianaMikael any ideas?

myshkov commented 5 months ago

This looks like a permission issue or something's wrong with the egg-info directory. I'd try removing 'src/transformercompression.egg-info' if it exists, and/or try installing from a different location.