Python help: egg_info did not run successfully

Hi everyone,
Here my issu when I run my setup.py

Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
          exec(compile('''
          ~~~~^^^^^^^^^^^^
          # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ...<31 lines>...
          exec(compile(setup_py_code, filename, "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ''' % ('C:\\Users\\Pina\\AppData\\Local\\Temp\\pip-install-9ojzx7r3\\sentencepiece_c6c18c5c987c4b5baa562d766ce100a7\\setup.py',), "<pip-setuptools-caller>", "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Pina\AppData\Local\Temp\pip-install-9ojzx7r3\sentencepiece_c6c18c5c987c4b5baa562d766ce100a7\setup.py", line 128, in <module>
          subprocess.check_call([
          ~~~~~~~~~~~~~~~~~~~~~^^
              'cmake',
              ^^^^^^^^
          ...<6 lines>...
              '-DCMAKE_INSTALL_PREFIX=build\\root',
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ])
          ^^
        File "C:\Users\Pina\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 416, in check_call
          retcode = call(*popenargs, **kwargs)
        File "C:\Users\Pina\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 397, in call
          with Popen(*popenargs, **kwargs) as p:
               ~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Pina\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1038, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              pass_fds, cwd, env,
                              ^^^^^^^^^^^^^^^^^^^
          ...<5 lines>...
                              gid, gids, uid, umask,
                              ^^^^^^^^^^^^^^^^^^^^^^
                              start_new_session, process_group)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Pina\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1550, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
                                   # no special security
                                   ^^^^^^^^^^^^^^^^^^^^^
          ...<4 lines>...
                                   ^^^^
                                   startupinfo)
                                   ^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
      [end of output]

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

Any suggestions?

Thanks in advace.

2 Likes

i thing i can solve this error but i need to see script and i’ll try!

1 Like

You are install a python package that requires compiling.
Specifically look like you do not have cmake installed.

If you are installing from PyPI then check that the package supports the version of python you are using. Sometime you can get things working by using an older version of python.

3 Likes

console wrote FileNotFoundError: [WinError 2] Impossibile trovare il file specificato
[end of output] that mean it can’t find file and i think its cmake

1 Like

Thanks for all support and your suggestions.
I changed the version of Python, and for now everything seems to be working.