我正在尝试使用Python在Python中安装fisher
pip install fisher
但我不断收到以下错误:
Collecting fisher
Using cached fisher-0.1.14.tar.gz (22 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting numpy (from fisher)
Using cached numpy-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
Using cached numpy-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB)
Building wheels for collected packages: fisher
Building wheel for fisher (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for fisher (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [118 lines of output]
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
running bdist_wheel
running build
running build_py
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
creating build
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/fisher
copying fisher/__init__.py -> build/lib.linux-x86_64-cpython-312/fisher
copying fisher/_version.py -> build/lib.linux-x86_64-cpython-312/fisher
copying fisher/tableprinter.py -> build/lib.linux-x86_64-cpython-312/fisher
running egg_info
writing fisher.egg-info/PKG-INFO
writing dependency_links to fisher.egg-info/dependency_links.txt
writing requirements to fisher.egg-info/requires.txt
writing top-level names to fisher.egg-info/top_level.txt
reading manifest file 'fisher.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.rst'
adding license file 'LICENSE'
writing manifest file 'fisher.egg-info/SOURCES.txt'
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
UPDATING build/lib.linux-x86_64-cpython-312/fisher/_version.py
set build/lib.linux-x86_64-cpython-312/fisher/_version.py to '0.1.14'
running build_ext
/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/src/cfisher.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
return pvalue(k, n - k, K - k, N - K - n + k)
@cython.boundscheck(False)
def pvalue_npy(
np.ndarray[np.uint_t] a_true,
^
------------------------------------------------------------
src/cfisher.pyx:129:21: Invalid type.
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
Failed to load config from /tmp/pip-install-ua4538cx/fisher_bd412cd798b24072b0c2e2088ab0a6cb/pyproject.toml: 'tool'
Try to load it from setup.cfg
Compiling src/cfisher.pyx because it changed.
[1/1] Cythonizing src/cfisher.pyx
Traceback (most recent call last):
File "/work/home/Software/anaconda3/envs/test/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/work/home/Software/anaconda3/envs/test/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/home/Software/anaconda3/envs/test/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 421, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 67, in <module>
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
self.run_command("build")
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "<string>", line 1974, in run
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 263, in build_extension
_build_ext.build_extension(self, ext)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/Cython/Distutils/build_ext.py", line 130, in build_extension
new_ext = cythonize(
^^^^^^^^^^
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/tmp/pip-build-env-byd4dvj_/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: src/cfisher.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for fisher
Failed to build fisher
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (fisher)
我有以下版本: Python 3.12.3 和 conda 24.7.1
感谢您的帮助!
fisher
目前仅支持到 python 3.11
你的python版本是3.12
https://pypi.org/project/fisher/
您可以单独安装
python 3.11
并使用fisher。