Failed cleaning build dir for numpy Failed to build numpy Installing collected packages: numpy Running setup.py install for numpy ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h5_vrlht/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3koy23ws-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: Running from numpy source directory. Note: if you need reliable uninstall behavior, then install with pip instead of using `setup.py install`: - `pip install .` (from a git repo or downloaded source release) - `pip install numpy` (last NumPy release on PyPi) Cythonizing sources Error compiling Cython file: ------------------------------------------------------------ ... cdef sfc64_state rng_state def __init__(self, seed=None): BitGenerator.__init__(self, seed) self._bitgen.state = <void *>&self.rng_state self._bitgen.next_uint64 = &sfc64_uint64 ^ ------------------------------------------------------------ _sfc64.pyx:90:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil' numpy/random/_bounded_integers.pxd.in has not changed Processing numpy/random/_sfc64.pyx Traceback (most recent call last): File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 235, in <module> main() File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 231, in main find_process_files(root_dir) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 222, in find_process_files process(root_dir, fromfile, tofile, function, hash_db) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 188, in process processor_function(fromfile, tofile) File "/tmp/pip-build-h5_vrlht/numpy/tools/cythonize.py", line 78, in process_pyx [sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile]) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'cython', '-3', '--fast-fail', '-o', '_sfc64.c', '_sfc64.pyx']' returned non-zero exit status 1. Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 508, in <module> setup_package() File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 488, in setup_package generate_cython() File "/tmp/pip-build-h5_vrlht/numpy/setup.py", line 285, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed! ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h5_vrlht/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3koy23ws-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-h5_vrlht/numpy/

时间: 2024-04-23 07:28:05 浏览: 26
您遇到了安装numpy时的错误。根据错误日志,问题出现在运行Cython编译器时。这可能是由于Cython版本不兼容或其他配置问题导致的。 您可以尝试以下解决方案: 1. 确保您使用的是最新版本的pip和setuptools。可以运行以下命令进行升级: ``` pip install --upgrade pip setuptools ``` 2. 确保您的系统已安装Cython。您可以尝试通过运行以下命令来安装Cython: ``` pip install Cython ``` 3. 如果您已经安装了Cython,并且问题仍然存在,请尝试降级Cython版本。运行以下命令: ``` pip install Cython==0.29.21 ``` 然后再次尝试安装numpy。 希望这些解决方案可以帮助您解决问题。如果问题仍然存在,请提供更多详细信息,以便我可以更好地帮助您。
相关问题

Collecting face_recognition Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB) Requirement already satisfied: Pillow in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (9.4.0) Requirement already satisfied: face-recognition-models>=0.3.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (0.3.0) Collecting dlib>=19.7 Using cached dlib-19.24.1.tar.gz (3.2 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: Click>=6.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (8.1.3) Requirement already satisfied: numpy in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (1.24.2) Requirement already satisfied: colorama in d:\anaconda\envs\pytorch\lib\site-packages (from Click>=6.0->face_recognition) (0.4.6) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [7 lines of output] running bdist_wheel running build running build_py running build_ext ERROR: CMake must be installed to build dlib [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib, face_recognition Running setup.py install for dlib ... error error: subprocess-exited-with-error × Running setup.py install for dlib did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running install D:\anaconda\envs\pytorch\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running build_ext ERROR: CMake must be installed to build dlib [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> dlib note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

这是一个安装dlib和face_recognition库时遇到的错误。根据错误输出,需要安装CMake才能构建dlib。你可以尝试通过以下命令安装CMake: ``` pip install cmake ``` 然后再重新安装dlib和face_recognition库即可。

twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed. Installing collected packages: numpy Found existing installation: numpy 1.15.1 Uninstalling numpy-1.15.1: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\add_newdocs.py' Consider using the `--user` option or check the permissions.

这个问题的原因是,twisted 18.7.0 要求安装 PyHamcrest>=1.9.0,但是你的环境中没有安装这个版本的 PyHamcrest。同时,你的 numpy 版本是 1.15.1,需要卸载这个版本才能安装新的版本。 解决这个问题的步骤如下: 1. 卸载 numpy 1.15.1。你可以通过在命令行中运行 `pip uninstall numpy` 来卸载 numpy。 2. 安装 PyHamcrest。你可以通过在命令行中运行 `pip install PyHamcrest` 来安装 PyHamcrest。 3. 安装新的 numpy。你可以通过在命令行中运行 `pip install numpy` 来安装新的版本的 numpy。 如果你在安装过程中遇到权限问题,可以尝试在命令行中使用管理员权限运行。另外,如果你使用的是 Anaconda 环境,可以尝试使用 `conda` 命令来安装这些包,例如 `conda install numpy` 和 `conda install PyHamcrest`。

相关推荐

import shap explainer = shap.TreeExplainer(reg) shap_values = explainer.shap_values(X_wrapper) shap.summary_plot(shap_values, X_wrapper,show=False) plt.title('SHAP Summary Plot') plt.xlabel('SHAP Value') plt.ylabel('Feature') plt.tight_layout() plt.savefig('E:/exercise/Nano/fig/shap_bay.pdf'),运行这段代码结果报错“initialization of _internal failed without raising an exception”,这个错误通常是由于Shap库的版本不兼容或缺少依赖项导致的。要解决这个问题,按照以上步骤操作后仍然报错“ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: 'G:\\Anaconda\\Lib\\site-packages\\~~mpy\\.libs\\libopenblas64__v0.3.21-gcc_10_3_0.dll' Consider using the --user option or check the permissions. Requirement already satisfied: shap in g:\anaconda\lib\site-packages (0.42.1) Requirement already satisfied: scikit-learn in g:\anaconda\lib\site-packages (from shap) (0.24.2) Requirement already satisfied: numba in g:\anaconda\lib\site-packages (from shap) (0.54.1) Requirement already satisfied: scipy in g:\anaconda\lib\site-packages (from shap) (1.7.1) Requirement already satisfied: numpy in g:\anaconda\lib\site-packages (from shap) (1.24.4) Requirement already satisfied: tqdm>=4.27.0 in g:\anaconda\lib\site-packages (from shap) (4.62.3) Requirement already satisfied: packaging>20.9 in g:\anaconda\lib\site-packages (from shap) (21.0) Requirement already satisfied: cloudpickle in g:\anaconda\lib\site-packages (from shap) (2.0.0) Requirement already satisfied: slicer==0.0.7 in g:\anaconda\lib\site-packages (from shap) (0.0.7) Requirement already satisfied: pandas in g:\anaconda\lib\site-packages (from shap) (1.3.4) Requirement already satisfied: pyparsing>=2.0.2 in g:\anaconda\lib\site-packages (from packaging>20.9->shap) (3.0.4) Requirement already satisfied: colorama in g:\anaconda\lib\site-packages (from tqdm>=4.27.0->shap) (0.4.6) Collecting numpy Downloading numpy-1.20.3-cp39-cp39-win_amd64.whl (13.7 MB) Requirement already satisfied: setuptools in g:\anaconda\lib\site-packages (from numba->shap) (58.0.4) Requirement already satisfied: llvmlite<0.38,>=0.37.0rc1 in g:\anaconda\lib\site-packages (from numba->shap) (0.37.0) Requirement already satisfied: pytz>=2017.3 in g:\anaconda\lib\site-packages (from pandas->shap) (2021.3) Requirement already satisfied: python-dateutil>=2.7.3 in g:\anaconda\lib\site-packages (from pandas->shap) (2.8.2) Requirement already satisfied: six>=1.5 in g:\anaconda\lib\site-packages (from python-dateutil>=2.7.3->pandas->shap) (1.16.0) Requirement already satisfied: threadpoolctl>=2.0.0 in g:\anaconda\lib\site-packages (from scikit-learn->shap) (2.2.0) Requirement already satisfied: joblib>=0.11 in g:\anaconda\lib\site-packages (from scikit-learn->shap) (1.1.0) Installing collected packages: numpy Attempting uninstall: numpy Found existing installation: numpy 1.24.4 Uninstalling numpy-1.24.4: Successfully uninstalled numpy-1.24.4”,应该如何解决?

最新推荐

recommend-type

Python Numpy:找到list中的np.nan值方法

今天小编就为大家分享一篇Python Numpy:找到list中的np.nan值方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
recommend-type

numpy:np.newaxis 实现将行向量转换成列向量

今天小编就为大家分享一篇numpy:np.newaxis 实现将行向量转换成列向量,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
recommend-type

基于numpy.random.randn()与rand()的区别详解

下面小编就为大家分享一篇基于numpy.random.randn()与rand()的区别详解,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
recommend-type

python numpy库np.percentile用法说明

主要介绍了python numpy库np.percentile用法说明,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
recommend-type

node-v5.2.0-linux-armv7l.tar.xz

Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

实现实时数据湖架构:Kafka与Hive集成

![实现实时数据湖架构:Kafka与Hive集成](https://img-blog.csdnimg.cn/img_convert/10eb2e6972b3b6086286fc64c0b3ee41.jpeg) # 1. 实时数据湖架构概述** 实时数据湖是一种现代数据管理架构,它允许企业以低延迟的方式收集、存储和处理大量数据。与传统数据仓库不同,实时数据湖不依赖于预先定义的模式,而是采用灵活的架构,可以处理各种数据类型和格式。这种架构为企业提供了以下优势: - **实时洞察:**实时数据湖允许企业访问最新的数据,从而做出更明智的决策。 - **数据民主化:**实时数据湖使各种利益相关者都可
recommend-type

list根据id查询pid 然后依次获取到所有的子节点数据

可以使用递归的方式来实现根据id查询pid并获取所有子节点数据。具体实现可以参考以下代码: ``` def get_children_nodes(nodes, parent_id): children = [] for node in nodes: if node['pid'] == parent_id: node['children'] = get_children_nodes(nodes, node['id']) children.append(node) return children # 测试数
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。