gemma icon indicating copy to clipboard operation
gemma copied to clipboard

'subprocess-exited-with-error' when installing gemma

Open bear96 opened this issue 1 year ago • 6 comments

Hello, I'm following the instructions provided in your Readme, and when I run pip install git+https://github.com/google-deepmind/gemma.git, it throws me an error that says "subprocess-exited-with-error". Here is the error log:

(env) PS C:\Users\aritram21\Desktop\gemma> gsudo pip install git+https://github.com/google-deepmind/gemma.git
Collecting git+https://github.com/google-deepmind/gemma.git
  Cloning https://github.com/google-deepmind/gemma.git to c:\users\aritram21\appdata\local\temp\pip-req-build-e5hq96ji
  Running command git clone --filter=blob:none --quiet https://github.com/google-deepmind/gemma.git 'C:\Users\aritram21\AppData\Local\Temp\pip-req-build-e5hq96ji'
  Resolved https://github.com/google-deepmind/gemma.git to commit 036083ab16843e09369a0138630687dba96d4d23
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting absl-py<3.0.0,>=2.1.0 (from gemma==1.0.0)
  Using cached absl_py-2.1.0-py3-none-any.whl.metadata (2.3 kB)
Collecting flax<0.8.0,>=0.7.5 (from gemma==1.0.0)
  Using cached flax-0.7.5-py3-none-any.whl.metadata (10 kB)
Collecting sentencepiece<0.2.0,>=0.1.99 (from gemma==1.0.0)
  Using cached sentencepiece-0.1.99.tar.gz (2.6 MB)
  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
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        File "C:\Users\aritram21\Desktop\gemma\env\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\aritram21\Desktop\gemma\env\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:\Users\aritram21\Desktop\gemma\env\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 "C:\Users\aritram21\AppData\Local\Temp\pip-build-env-8939h79t\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\aritram21\AppData\Local\Temp\pip-build-env-8939h79t\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\aritram21\AppData\Local\Temp\pip-build-env-8939h79t\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\aritram21\AppData\Local\Temp\pip-build-env-8939h79t\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 126, in <module>
        File "C:\Python312\Lib\subprocess.py", line 408, in check_call
          retcode = call(*popenargs, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\subprocess.py", line 389, in call
          with Popen(*popenargs, **kwargs) as p:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\Python312\Lib\subprocess.py", line 1538, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [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.

I'm using Windows 10 and Python 3.12.1. I have also installed JAX before running the above command. Any help would be greatly appreciated!

bear96 avatar Feb 23 '24 20:02 bear96

Maybe go through https://bobbyhadz.com/blog/python-note-this-error-originates-from-subprocess to see if any of the suggestions help.

davidebbo avatar Feb 24 '24 15:02 davidebbo

I encountered the same issue when using Windows 11 and Python 3.12, but it was successful after downgrading to Python 3.10.

Kurumifans avatar Feb 25 '24 12:02 Kurumifans

Maybe go through https://bobbyhadz.com/blog/python-note-this-error-originates-from-subprocess to see if any of the suggestions help.

I tried them out already and they didn't unfortunately.

I encountered the same issue when using Windows 11 and Python 3.12, but it was successful after downgrading to Python 3.10.

I was trying to run it on my work computer which has the exact same specs as my personal laptop and it didn't work. However it ran fine on my personal laptop. I believe this error is occurring due to some module not being compatible with the environment. I'll try downgrading Python in my work laptop to see if that fixes it or else find out which package is causing this issue.

bear96 avatar Feb 25 '24 14:02 bear96

I encountered the same error on Windows 10 and Python 3.12.1.

nowthree avatar Feb 26 '24 02:02 nowthree

I kind of remember hit into this problem in WSL of my local notebook and i found the access right of folders (root, root) causing the problem, created by sudo. I later on do everything without sudo (initially i have to use sudo cos access right problem but i cant figure out the cause now)

rhpoon avatar Mar 02 '24 12:03 rhpoon

Did the last suggestion help solve the problem or it still persists?

gustheman avatar Jul 15 '24 14:07 gustheman