Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install -e . #6

Closed
lior007 opened this issue Nov 9, 2024 · 5 comments
Closed

pip install -e . #6

lior007 opened this issue Nov 9, 2024 · 5 comments

Comments

@lior007
Copy link

lior007 commented Nov 9, 2024

i got error

Obtaining file:///E:/FROM-FOLDER-D/github/nunchaku
Preparing metadata (setup.py) ... done
Installing collected packages: nunchaku
Attempting uninstall: nunchaku
Found existing installation: nunchaku 0.15.1
Uninstalling nunchaku-0.15.1:
Successfully uninstalled nunchaku-0.15.1
DEPRECATION: Legacy editable install of nunchaku==0.0.0b0 from file:///E:/FROM-FOLDER-D/github/nunchaku (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457
Running setup.py develop for nunchaku
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [106 lines of output]
    C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py:337: InformationOnly: Normalizing '0.0.0beta0' to '0.0.0b0'
      self.metadata.version = self._normalize_version(self.metadata.version)
    running develop
    C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running egg_info
    writing nunchaku.egg-info\PKG-INFO
    writing dependency_links to nunchaku.egg-info\dependency_links.txt
    writing top-level names to nunchaku.egg-info\top_level.txt
    reading manifest file 'nunchaku.egg-info\SOURCES.txt'
    adding license file 'LICENCE.txt'
    writing manifest file 'nunchaku.egg-info\SOURCES.txt'
    running build_ext
    C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py:380: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
      warnings.warn(f'Error checking compiler version for {compiler}: {error}')
    building 'nunchaku._C' extension
    Emitting ninja build file E:\FROM-FOLDER-D\github\nunchaku\build\temp.win-amd64-cpython-311\Release\build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    ninja: error: FindFirstFileExA(E:/FROM-FOLDER-D/github/nunchaku/src/kernels/flash_attn): The directory name is invalid.


    Traceback (most recent call last):
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 2105, in _run_ninja_build
        subprocess.run(
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\subprocess.py", line 571, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "E:\FROM-FOLDER-D\github\nunchaku\setup.py", line 94, in <module>
        setuptools.setup(
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\__init__.py", line 117, in setup
        return distutils.core.setup(**attrs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
        return run_commands(dist)
               ^^^^^^^^^^^^^^^^^^
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
        dist.run_commands()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
        self.run_command(cmd)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py", line 999, in run_command
        super().run_command(command)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
        cmd_obj.run()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py", line 35, in run
        self.install_for_development()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py", line 112, in install_for_development
        self.run_command('build_ext')
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
        self.distribution.run_command(command)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py", line 999, in run_command
        super().run_command(command)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
        cmd_obj.run()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\build_ext.py", line 98, in run
        _build_ext.run(self)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
        self.build_extensions()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 866, in build_extensions
        build_ext.build_extensions(self)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 476, in build_extensions
        self._build_extensions_serial()
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 502, in _build_extensions_serial
        self.build_extension(ext)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\build_ext.py", line 263, in build_extension
        _build_ext.build_extension(self, ext)
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 557, in build_extension
        objects = self.compiler.compile(
                  ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 838, in win_wrap_ninja_compile
        _write_ninja_file_and_compile_objects(
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 1785, in _write_ninja_file_and_compile_objects
        _run_ninja_build(
      File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 2121, in _run_ninja_build
        raise RuntimeError(message) from e
    RuntimeError: Error compiling objects for extension
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Rolling back uninstall of nunchaku
Moving to c:\users\lior0\miniconda3\envs\nunchaku\lib\site-packages\nunchaku-0.15.1.dist-info
from C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages~unchaku-0.15.1.dist-info
Moving to c:\users\lior0\miniconda3\envs\nunchaku\lib\site-packages\nunchaku
from C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages~unchaku
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [106 lines of output]
C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py:337: InformationOnly: Normalizing '0.0.0beta0' to '0.0.0b0'
self.metadata.version = self._normalize_version(self.metadata.version)
running develop
C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
writing nunchaku.egg-info\PKG-INFO
writing dependency_links to nunchaku.egg-info\dependency_links.txt
writing top-level names to nunchaku.egg-info\top_level.txt
reading manifest file 'nunchaku.egg-info\SOURCES.txt'
adding license file 'LICENCE.txt'
writing manifest file 'nunchaku.egg-info\SOURCES.txt'
running build_ext
C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py:380: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'nunchaku._C' extension
Emitting ninja build file E:\FROM-FOLDER-D\github\nunchaku\build\temp.win-amd64-cpython-311\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: error: FindFirstFileExA(E:/FROM-FOLDER-D/github/nunchaku/src/kernels/flash_attn): The directory name is invalid.


Traceback (most recent call last):
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 2105, in _run_ninja_build
    subprocess.run(
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "<pip-setuptools-caller>", line 34, in <module>
  File "E:\FROM-FOLDER-D\github\nunchaku\setup.py", line 94, in <module>
    setuptools.setup(
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
    dist.run_commands()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
    self.run_command(cmd)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py", line 999, in run_command
    super().run_command(command)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
    cmd_obj.run()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py", line 35, in run
    self.install_for_development()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py", line 112, in install_for_development
    self.run_command('build_ext')
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py", line 999, in run_command
    super().run_command(command)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
    cmd_obj.run()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\build_ext.py", line 98, in run
    _build_ext.run(self)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
    self.build_extensions()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 866, in build_extensions
    build_ext.build_extensions(self)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\build_ext.py", line 263, in build_extension
    _build_ext.build_extension(self, ext)
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 557, in build_extension
    objects = self.compiler.compile(
              ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 838, in win_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 1785, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "C:\Users\LIOR0\miniconda3\envs\nunchaku\Lib\site-packages\torch\utils\cpp_extension.py", line 2121, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

@sxtyzhangzk
Copy link
Collaborator

Hi, we are looking into the compatibility issue on Windows.
Before that, I would recommend trying nunchaku on WSL2 for Windows users. Guide (make sure to select wsl 2 instead of wsl 1).

@nitinmukesh
Copy link

nitinmukesh commented Nov 9, 2024

Getting the same error :(
Please make it work on Windows, WSL doesn't work for some reason.


(nunchaku) C:\ai\nunchaku>pip install -e .
Looking in indexes: https://pypi.org/simple/, https://pypi.ngc.nvidia.com
Obtaining file:///C:/ai/nunchaku
  Preparing metadata (setup.py) ... done
Installing collected packages: nunchaku
  DEPRECATION: Legacy editable install of nunchaku==0.0.0b0 from file:///C:/ai/nunchaku (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
  Running setup.py develop for nunchaku
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [115 lines of output]
        C:\Users\nitin\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\dist.py:294: InformationOnly: Normalizing '0.0.0beta0' to '0.0.0b0'
          self.metadata.version = self._normalize_version(self.metadata.version)
        running develop
        C:\Users\nitin\miniconda3\envs\nunchaku\Lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://github.com/pypa/setuptools/issues/917 for details.

@lior007
Copy link
Author

lior007 commented Nov 9, 2024

Hi, we are looking into the compatibility issue on Windows. Before that, I would recommend trying nunchaku on WSL2 for Windows users. Guide (make sure to select wsl 2 instead of wsl 1).

how to insttal with wsl?
wsl --install -e .?

@sxtyzhangzk
Copy link
Collaborator

Hi, we are looking into the compatibility issue on Windows. Before that, I would recommend trying nunchaku on WSL2 for Windows users. Guide (make sure to select wsl 2 instead of wsl 1).

how to insttal with wsl? wsl --install -e .?

You need to first install WSL by using wsl --install in Windows. After that, you could use wsl to enter WSL, which is basically a virtual machine of Ubuntu.

@lmxyy
Copy link
Collaborator

lmxyy commented Nov 14, 2024

Since there is no further replies in the issue, I will close it for now. Feel free to reopen it.

@lmxyy lmxyy closed this as completed Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants