quantopian / zipline

Zipline, a Pythonic Algorithmic Trading Library
https://www.zipline.io
Apache License 2.0
17.75k stars 4.74k forks source link

Getting and error when pip3 install zipline on CentOS 7. #1883

Open A-L-Verminburger opened 7 years ago

A-L-Verminburger commented 7 years ago

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ydf0lqw9/zipline/

Have installed the prerequisites: $ yum install atlas-devel gcc-c++ gcc-gfortran libgfortran python-devel redhat-rep-config

freddiev4 commented 7 years ago

Hi there. Could you provide us with the full output of your terminal when you run pip3 install zipline?

kaybinwong commented 6 years ago

@freddiev4 i had the same issue. here is the full output.

 ⚡ root@unipay-test  /data  pip3 install zipline                                                                      
Collecting zipline
  Using cached https://files.pythonhosted.org/packages/15/d3/689f2a940478b82ac57c751a40460598221fd82b0449a7a8f7eef47a3bcc/zipline-1.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Plex/Scanners.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Plex/Actions.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Pythran.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Lexicon.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Scanning.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Parsing.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Visitor.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/FlowControl.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Code.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Runtime/refnanny.pyx because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/FusedNode.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Tempita/_tempita.py because it changed.
    Compiling /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/StringIOTree.py because it changed.
    [ 1/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Code.py
    [ 2/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/FlowControl.py
    [ 3/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/FusedNode.py
    [ 4/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Lexicon.py
    [ 5/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Parsing.py
    [ 6/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Pythran.py
    [ 7/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Scanning.py
    [ 8/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Compiler/Visitor.py
    [ 9/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Plex/Actions.py
    [10/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Plex/Scanners.py
    [11/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Runtime/refnanny.pyx
    [12/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/StringIOTree.py
    [13/13] Cythonizing /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Tempita/_tempita.py
    Unable to find pgen, not compiling formal grammar.
    /usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    warning: no files found matching '2to3-fixers.txt'
    warning: no files found matching 'Doc/*'
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    warning: no files found matching 'pyximport/README'
    /tmp/easy_install-5qxmpilh/Cython-0.28.2/Cython/Plex/Scanners.c:19:20: 致命错误:Python.h:没有那个文件或目录
     #include "Python.h"
                        ^
    编译中断。
    Traceback (most recent call last):
      File "/usr/lib64/python3.4/distutils/unixccompiler.py", line 126, in _compile
        extra_postargs)
      File "/usr/lib64/python3.4/distutils/ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "/usr/lib64/python3.4/distutils/spawn.py", line 36, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/lib64/python3.4/distutils/spawn.py", line 162, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 160, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 146, in call_command
        self.run_command(cmdname)
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/install_lib.py", line 10, in run
        self.build()
      File "/usr/lib64/python3.4/distutils/command/install_lib.py", line 107, in build
        self.run_command('build_ext')
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/build_ext.py", line 49, in run
        _build_ext.run(self)
      File "/usr/lib64/python3.4/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/usr/lib64/python3.4/distutils/command/build_ext.py", line 448, in build_extensions
        self.build_extension(ext)
      File "/usr/lib/python3.4/site-packages/setuptools/command/build_ext.py", line 174, in build_extension
        _build_ext.build_extension(self, ext)
      File "/usr/lib64/python3.4/distutils/command/build_ext.py", line 503, in build_extension
        depends=ext.depends)
      File "/usr/lib64/python3.4/distutils/ccompiler.py", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/usr/lib64/python3.4/distutils/unixccompiler.py", line 128, in _compile
        raise CompileError(msg)
    distutils.errors.CompileError: command 'gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
        return func()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
        _execfile(setup_script, ns)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-5qxmpilh/Cython-0.28.2/setup.py", line 285, in <module>
        conda_format=conda_build,
      File "/usr/lib64/python3.4/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1065, in run_setup
        run_setup(setup_script, args)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 242, in run_setup
        raise
      File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 141, in resume
        compat.reraise(type, exc, self._tb)
      File "/usr/lib/python3.4/site-packages/setuptools/compat.py", line 69, in reraise
        raise value.with_traceback(tb)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
        return func()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
        _execfile(setup_script, ns)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-5qxmpilh/Cython-0.28.2/setup.py", line 285, in <module>
        conda_format=conda_build,
      File "/usr/lib64/python3.4/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: command 'gcc' failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-pjueytws/zipline/setup.py", line 328, in <module>
        **conditional_arguments
      File "/usr/lib64/python3.4/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 268, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 312, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 846, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1091, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1103, in obtain
        return installer(requirement)
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 379, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 638, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 668, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 851, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1079, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1067, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-pjueytws/zipline/