vatic icon indicating copy to clipboard operation
vatic copied to clipboard

Error installing on Ubuntu 14.04

Open mtourne opened this issue 9 years ago • 10 comments

On ubuntu 14.04, with Cython version 0.22

cythoning vision/annotations.pyx to vision/annotations.c
Traceback (most recent call last):
  File "setup.py", line 70, in <module>
    ext_modules = ext_modules,
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
[...]
 File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 620, in generate_evaluation_code
    self.generate_result_code(code)
  File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 3592, in generate_result_code
    self.type, self.base.type)
AssertionError: unexpected type long and base type tuple object for indexing

mtourne avatar Feb 22 '15 09:02 mtourne

Cython 0.22 came from pip

Fixed with issue with

sudo pip install cython==0.20 

mtourne avatar Feb 22 '15 09:02 mtourne

@mtourne Error still exists after installing cython from pip.

running install_lib running build_py running build_ext cythoning vision/annotations.pyx to vision/annotations.c Traceback (most recent call last): File "setup.py", line 70, in ext_modules = ext_modules, File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 88, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 185, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 171, in call_command self.run_command(cmdname) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 21, in run self.build() File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 163, in run _build_ext.build_ext.run(self) File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run self.build_extensions() File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 170, in build_extensions ext.sources = self.cython_sources(ext.sources, ext) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 319, in cython_sources full_module_name=module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 637, in compile return compile_single(source, options, full_module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 590, in compile_single return run_pipeline(source, options, full_module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 447, in run_pipeline err, enddata = Pipeline.run_pipeline(pipeline, source) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py", line 328, in run_pipeline data = phase(data) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py", line 54, in generate_pyx_code_stage module_node.process_implementation(options, result) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py", line 112, in process_implementation self.generate_c_code(env, options, result) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py", line 331, in generate_c_code self.body.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 426, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 426, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 4549, in generate_function_definitions self.body.generate_function_definitions(self.scope, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 426, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 3028, in generate_function_definitions FuncDefNode.generate_function_definitions(self, env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 1900, in generate_function_definitions self.generate_function_body(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 1668, in generate_function_body self.body.generate_execution_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 432, in generate_execution_code stat.generate_execution_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 4696, in generate_execution_code self.generate_rhs_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 4972, in generate_rhs_evaluation_code self.rhs.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 614, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 629, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 9587, in generate_evaluation_code super(NumBinopNode, self).generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 614, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 629, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 614, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 629, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 620, in generate_evaluation_code self.generate_result_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 3592, in generate_result_code self.type, self.base.type) AssertionError: unexpected type long and base type tuple object for indexing

sharathchandra92 avatar Mar 23 '15 01:03 sharathchandra92

Resolved by removing cython from the shell script after installing cython2.0

sharathchandra92 avatar Mar 23 '15 04:03 sharathchandra92

@mtourne it works for me ,thanks so much

ghost avatar Apr 10 '15 02:04 ghost

it works for me!! thank you!

alison05921 avatar May 08 '15 13:05 alison05921

It works

cabaf avatar Aug 18 '15 20:08 cabaf

Hi, Solved the problem for turkic setup.py but the problem still persists even after my cython change in pyvision . could you please help me?

cython -V Cython version 0.20

and then

sudo python setup.py install . . . running build_ext cythoning vision/annotations.pyx to vision/annotations.c Traceback (most recent call last): File "setup.py", line 70, in ext_modules = ext_modules, File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 88, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 185, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 171, in call_command self.run_command(cmdname) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 21, in run self.build() File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 164, in run _build_ext.build_ext.run(self) File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run self.build_extensions() File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 171, in build_extensions ext.sources = self.cython_sources(ext.sources, ext) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Distutils/build_ext.py", line 320, in cython_sources full_module_name=module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 677, in compile return compile_single(source, options, full_module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 630, in compile_single return run_pipeline(source, options, full_module_name) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 487, in run_pipeline err, enddata = Pipeline.run_pipeline(pipeline, source) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py", line 328, in run_pipeline data = phase(data) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py", line 53, in generate_pyx_code_stage module_node.process_implementation(options, result) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py", line 118, in process_implementation self.generate_c_code(env, options, result) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py", line 339, in generate_c_code self.body.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 436, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 436, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 4637, in generate_function_definitions self.body.generate_function_definitions(self.scope, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 436, in generate_function_definitions stat.generate_function_definitions(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 3056, in generate_function_definitions FuncDefNode.generate_function_definitions(self, env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 1923, in generate_function_definitions self.generate_function_body(env, code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 1681, in generate_function_body self.body.generate_execution_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 442, in generate_execution_code stat.generate_execution_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 4787, in generate_execution_code self.generate_rhs_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 5073, in generate_rhs_evaluation_code self.rhs.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 627, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 642, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 10088, in generate_evaluation_code super(NumBinopNode, self).generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 627, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 642, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 627, in generate_evaluation_code self.generate_subexpr_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 642, in generate_subexpr_evaluation_code node.generate_evaluation_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 633, in generate_evaluation_code self.generate_result_code(code) File "/usr/local/lib/python2.7/dist-packages/Cython-0.23.4-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py", line 3726, in generate_result_code self.type, self.base.type) AssertionError: unexpected type long and base type tuple object for indexing

athus1990 avatar Jan 04 '16 18:01 athus1990

I can confirm the problem as described, and the workaround:

sudo pip install cython==0.20

I did an rm -rf build before re-triggering the build to be safe; the build system seemed to start where it left off even though cython changed, and I don't want objects compiled with different versions of cython.

That got me through that issue, but hours later I am still fighting to get the install to work, so take it with a grain of salt.

drewm1980 avatar Feb 19 '16 09:02 drewm1980

thank's to @drewm1980. That's good solution in 14.04

vskubriev avatar Mar 25 '16 11:03 vskubriev

1、check cython's version: cython -V vatic@ubuntu:~/pyvision$ cython -V Cython version 0.24

2、remove Cython version 0.24、install Cython version 0.20 sudo easy_install -m cython sudo easy_install -U cython==0.20

OR sudo pip install cython==0.20

QQ group about VATIC: 148721535

ymm8505 avatar May 12 '16 10:05 ymm8505