gpt4 book ai didi

python - 使用 pip 和 virtualenv 的 scipy 安装以错误和 g++ 退出状态 4 结束

转载 作者:太空狗 更新时间:2023-10-29 19:25:32 25 4
gpt4 key购买 nike

我在 AWS(亚马逊网络服务)上使用微型实例并安装在 python 3.3.2 虚拟环境中。我试过:

pip 安装 scipy

pip install -e git+https://github.com/scipy/scipy.git#egg=scipy

他们结束于:

  Please submit a full bug report,

with preprocessed source if appropriate.

See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

In file included from /home/ubuntu/rose/lib/python3.3/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760:0,

from /home/ubuntu/rose/lib/python3.3/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,

from scipy/sparse/sparsetools/sparsetools.h:5,

from scipy/sparse/sparsetools/bsr.cxx:4:

/home/ubuntu/rose/lib/python3.3/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

g++: internal compiler error: Killed (program cc1plus)

Please submit a full bug report,

with preprocessed source if appropriate.

See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

Running from scipy source directory.

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)' (available names: [])

error: Command "g++ -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/home/ubuntu/rose/lib/python3.3/site-packages/numpy/core/include -I/usr/local/include/python3.3m -c scipy/sparse/sparsetools/bsr.cxx -o build/temp.linux-x86_64-3.3/scipy/sparse/sparsetools/bsr.o" failed with exit status 4

----------------------------------------
Cleaning up...
Removing temporary dir /home/ubuntu/rose/build...
Command /home/ubuntu/rose/bin/python3.3 -c "import setuptools, tokenize; __file__='/home/ubuntu/rose/src/scipy/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /home/ubuntu/rose/src/scipy
Exception information:
Traceback (most recent call last):
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/req.py", line 665, in install
self.install_editable(install_options, global_options)
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/req.py", line 775, in install_editable
show_stdout=False)
File "/home/ubuntu/rose/lib/python3.3/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command /home/ubuntu/rose/bin/python3.3 -c "import setuptools, tokenize; __file__='/home/ubuntu/rose/src/scipy/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /home/ubuntu/rose/src/scipy

然后,我尝试对交换做一些事情,在这篇文章之后:Trouble installing scipy in virtualenv on a amazon ec2 linux micro instance但它只是挂了很久。

有人可以帮忙吗?

最佳答案

我刚刚遇到了类似的错误,我想我是通过将 VM 上的内存从 368MB 增加到 1024MB 来修复它的。我以前在 368MB 的 VM 上成功构建,但我猜其他程序可能一直在使用更多内存。

AWS 微型实例没有足够的可用内存,所以我猜这也可能是原因。

关于python - 使用 pip 和 virtualenv 的 scipy 安装以错误和 g++ 退出状态 4 结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22432786/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com