Skip to content

Minor edit to setup.py#2

Merged
tridao merged 1 commit into
state-spaces:mainfrom
yair-schiff:fix/setup
Dec 4, 2023
Merged

Minor edit to setup.py#2
tridao merged 1 commit into
state-spaces:mainfrom
yair-schiff:fix/setup

Conversation

@yair-schiff
Copy link
Copy Markdown
Contributor

Issue: Using pip install . was failing with the following error:

Building wheels for collected packages: mamba-ssm                                                                                                                                                                                                                               
  Building wheel for mamba-ssm (setup.py) ... error                                                                                                                                                                                                                             
  error: subprocess-exited-with-error                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                
  × python setup.py bdist_wheel did not run successfully.                                                                                                                                                                                                                       
  │ exit code: 1                                                                                                                                                                                                                                                                
  ╰─> [9 lines of output]                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                
      torch.__version__  = 2.1.1                                                                                                                                                                                                                                                
      
      
      running bdist_wheel
      Guessing wheel URL:  https://github.com/state-spaces/mamba/releases/download/v1.0.1/mamba_ssm-1.0.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
      Raw wheel path /tmp/pip-wheel-ksro0zqu/mamba_ssm-1.0.1-cp310-cp310-linux_x86_64.whl
      error: [Errno 18] Invalid cross-device link: 'mamba_ssm-1.0.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl' -> '/tmp/pip-wheel-ksro0zqu/mamba_ssm-1.0.1-cp310-cp310-linux_x86_64.whl'
      [end of output]
   
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mamba-ssm
  Running setup.py clean for mamba-ssm
Failed to build mamba-ssm
ERROR: Could not build wheels for mamba-ssm, which is required to install pyproject.toml-based projects

As per this thread, the issue was potentially caused by the source and destination files passed to os.rename not being on the same filesystem (I was installing on a shared cluster and so the repo and the tmp might be different nfs).

Fix: Changing os.rename to shutil.move fixed this issue.

@nousr
Copy link
Copy Markdown

nousr commented Dec 4, 2023

this solved the issue for me, thanks

@tridao tridao merged commit 1eeb1c8 into state-spaces:main Dec 4, 2023
@tridao
Copy link
Copy Markdown
Collaborator

tridao commented Dec 4, 2023

Thanks @yair-schiff !

@yair-schiff yair-schiff deleted the fix/setup branch December 5, 2023 00:35
Esthercyz pushed a commit to Esthercyz/mamba_1 that referenced this pull request Jan 29, 2026
soumilbaldota referenced this pull request in hpmls26/simamba Apr 4, 2026
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

Successfully merging this pull request may close these issues.

3 participants