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

An error went when I ran pip install --upgrade tensorflow-federated #4175

Closed
stupidhhh opened this issue Oct 10, 2023 · 2 comments
Closed

An error went when I ran pip install --upgrade tensorflow-federated #4175

stupidhhh opened this issue Oct 10, 2023 · 2 comments

Comments

@stupidhhh
Copy link

The following is the error message:
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [134 lines of output]
Running from numpy source directory.
:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
required_version = LooseVersion('0.29.14')
C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cython_version) < required_version:
performance hint: _common.pyx:261:19: Exception check will always require the GIL to be acquired. Possible solutions:
1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:285:19: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:308:50: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:411:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:448:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:490:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:573:36: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:577:36: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:581:36: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:585:36: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:617:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:652:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:687:63: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:727:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:756:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:874:40: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:878:40: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:882:41: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:887:40: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:891:41: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:895:38: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:930:31: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _common.pyx:972:32: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.

  performance hint: _generator.pyx:811:41: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      2. Use an 'int' return type on the function to allow an error code to be returned.
  performance hint: _generator.pyx:840:45: Exception check will always require the GIL to be acquired. Possible solutions:
      1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      2. Use an 'int' return type on the function to allow an error code to be returned.

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          for i in range(1, RK_STATE_LEN):
              self.rng_state.key[i] = val[i]
          self.rng_state.pos = i

          self._bitgen.state = &self.rng_state
          self._bitgen.next_uint64 = &mt19937_uint64
                                     ^
  ------------------------------------------------------------

  _mt19937.pyx:138:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.
  Processing numpy/random\_bounded_integers.pxd.in
  Processing numpy/random\mtrand.pyx
  Processing numpy/random\_bit_generator.pyx
  Processing numpy/random\_bounded_integers.pyx.in
  Processing numpy/random\_common.pyx
  Processing numpy/random\_generator.pyx
  Processing numpy/random\_mt19937.pyx
  Traceback (most recent call last):
    File "C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py", line 238, in <module>
      main()
    File "C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py", line 234, in main
      find_process_files(root_dir)
    File "C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py", line 225, in find_process_files
      process(root_dir, fromfile, tofile, function, hash_db)
    File "C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py", line 191, in process
      processor_function(fromfile, tofile)
    File "C:\Users\52230\AppData\Local\Temp\pip-install-2fxf6wjc\numpy_c7be80a29140413cb6bd54d44d03413e\tools\cythonize.py", line 80, in process_pyx
      subprocess.check_call(
    File "d:\environment\python\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['C:\\Users\\52230\\.virtualenvs\\tff_test-eQiePbH9\\Scripts\\python.exe', '-m', 'cython', '-3', '--fast-fail', '-o', '_mt19937.c', '_mt19937.pyx']' returned non-zero exit status 1.
  Cythonizing sources
  Traceback (most recent call last):
    File "C:\Users\52230\.virtualenvs\tff_test-eQiePbH9\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\52230\.virtualenvs\tff_test-eQiePbH9\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\52230\.virtualenvs\tff_test-eQiePbH9\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "C:\Users\52230\AppData\Local\Temp\pip-build-env-ycik76oq\overlay\Lib\site-packages\setuptools\build_meta.py", line 396, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "C:\Users\52230\AppData\Local\Temp\pip-build-env-ycik76oq\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "C:\Users\52230\AppData\Local\Temp\pip-build-env-ycik76oq\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 488, in <module>
    File "<string>", line 469, in setup_package
    File "<string>", line 275, in generate_cython
  RuntimeError: Running cythonize failed!
  [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@zcharles8
Copy link
Collaborator

Can you fill out the bug template info? In particular, from the stack trace it looks like you might be on Windows. Unfortuantely, TFF does not work on Windows currently.

Additionally, is this failure only recently? Eg. were you able to do pip install --upgrade successfully last week?

@stupidhhh
Copy link
Author

Can you fill out the bug template info? In particular, from the stack trace it looks like you might be on Windows. Unfortuantely, TFF does not work on Windows currently.

Additionally, is this failure only recently? Eg. were you able to do pip install --upgrade successfully last week?

Thank you, I solved the problem using Anaconda

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

2 participants