问题描述
我试图从源头制作 Sage,但我失败了.Yosemite 上似乎缺少库 _scproxy.我还没有在 SO 上和网络上的任何地方找到非常有用的帮助.如果有人可以帮助我.这是日志:
I tried to make Sage from the source but I failed. It seems that the library _scproxy is missing on Yosemite. I haven't found a very helpful aid here on SO and everywhere on the net. If someone can help me. Here is the log :
Found local metadata for setuptools-12.4
Found local sources at /Users/sam/Downloads/sage-6.7/upstream/setuptools-12.4.tar.gz
Checksum: 427e916ad99a704af54b7aa3124bd52d4ebf04d3 vs 427e916ad99a704af54b7aa3124bd52d4ebf04d3
setuptools-12.4
====================================================
Setting up build directory for setuptools-12.4
Finished set up
****************************************************
Host system:
Darwin dhcp-147-65-172-203.impa.br 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Users/sam/Downloads/sage-6.7/local/libexec/gcc/x86_64-apple-darwin14.3.0/4.9.2/lto-wrapper
Target: x86_64-apple-darwin14.3.0
Configured with: ../src/configure --prefix=/Users/sam/Downloads/sage-6.7/local --with-local-prefix=/Users/sam/Downloads/sage-6.7/local --with-gmp=/Users/sam/Downloads/sage-6.7/local --with-mpfr=/Users/sam/Downloads/sage-6.7/local --with-mpc=/Users/sam/Downloads/sage-6.7/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --with-build-config=bootstrap-debug --without-isl --without-cloog
Thread model: posix
gcc version 4.9.2 (GCC)
****************************************************
patching file setuptools/command/easy_install.py
Hunk #1 succeeded at 1491 (offset 45 lines).
Hunk #2 succeeded at 1529 with fuzz 1 (offset 45 lines).
Hunk #3 succeeded at 1555 (offset 45 lines).
patching file pkg_resources/__init__.py
Traceback (most recent call last):
File "setup.py", line 21, in <module>
exec(init_file.read(), command_ns)
File "<string>", line 11, in <module>
File "/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4/src/setuptools/__init__.py", line 11, in <module>
from setuptools.extension import Extension
File "/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4/src/setuptools/extension.py", line 8, in <module>
from .dist import _get_unpatched
File "/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4/src/setuptools/dist.py", line 16, in <module>
from setuptools.depends import Require
File "/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4/src/setuptools/depends.py", line 6, in <module>
from setuptools import compat
File "/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4/src/setuptools/compat.py", line 19, in <module>
from SimpleHTTPServer import SimpleHTTPRequestHandler
File "/Users/sam/Downloads/sage-6.7/local/lib/python/SimpleHTTPServer.py", line 16, in <module>
import urllib
File "/Users/sam/Downloads/sage-6.7/local/lib/python/urllib.py", line 1399, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: No module named _scproxy
real 0m0.113s
user 0m0.059s
sys 0m0.037s
************************************************************************
Error installing package setuptools-12.4
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/Users/sam/Downloads/sage-6.7/logs/pkgs/setuptools-12.4.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/Users/sam/Downloads/sage-6.7/local/var/tmp/sage/build/setuptools-12.4' && '/Users/sam/Downloads/sage-6.7/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
好的,我不知道发生了什么,但我重新启动了建筑物,这似乎有效.我没有任何gcc.当我输入 gcc -v
时,有人回答我说我有 clang 而不是它......当我第一次 make
它时,控制台要求我重命名我的目录 opt/local
因为自制软件.认为这是第一次不起作用的原因.我在编译 sage 时将其重命名为 opt/local
...
EDIT : Ok I don't know what was going on but I restarted for the beginning the building and this seems to work. I don't have any gcc. When i type gcc -v
, one answer me that I have clang instead of it ... When i make
it at the first time, the console asked me to rename my directory opt/local
because of homebrew. Is think that is what didn't work at the first time. I rename it opt/local
during the compilation of sage ...
推荐答案
这可能是由于 Python 构建(即 Sage 的 Python)未能成功构建此模块;请参阅这个 sage-release 线程.原则上 http://trac.sagemath.org/ticket/17174 应该已经修复它(见http://trac.sagemath.org/ticket/17169) 但也许您使用的是非-Sage gcc,比如自制软件?在这种情况下,您需要要么使 changethatlowe">"a> 某处,或者可能只是使用 Sage 的 gcc,您可以使用 SAGE_INSTALL_GCC=yes
(当然,这需要更长的时间).祝你好运!
Probably this is due to a Python build (Sage's Python, that is) that didn't successfully build this module; see this sage-release thread. In principle http://trac.sagemath.org/ticket/17174 should have fixed it (see http://trac.sagemath.org/ticket/17169) but perhaps you are using a non-Sage gcc, such as homebrew? In that event you'll need to either make that change somewhere or perhaps to just use Sage's gcc, which you do with SAGE_INSTALL_GCC=yes
(though that will take longer, of course). Good luck!
这篇关于导入错误:没有名为 _scproxy 的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!