質問

I'd like to install the following package for Python: http://www.daimi.au.dk/~mailund/suffix_tree/ I have downloaded the archive, unpacked it and run the following command in the terminal:

  python /Users/USRName/Documents/suffix_tree-2.1/setup.py install

When it is executed, the following error occures

  running install
  running build
  running build_py
  file suffix_tree.py (for module suffix_tree) not found
  file suffix_tree.py (for module suffix_tree) not found
  running build_ext
  building '_suffix_tree' extension
  gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3        -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c python_bindings.c -o   build/temp.macosx-10.6-intel-2.7/python_bindings.o
  i686-apple-darwin11-gcc-4.2.1: python_bindings.c: No such file or directory
  i686-apple-darwin11-gcc-4.2.1: no input files
  i686-apple-darwin11-gcc-4.2.1: python_bindings.c: No such file or directory
  i686-apple-darwin11-gcc-4.2.1: no input files
  lipo: can't figure out the architecture type of:         /var/folders/z0/6_4y_75s4dxf7fkndh7rrc6r0000gn/T//ccbGRVor.out

error: command 'gcc-4.2' failed with exit status 1

Would you be so kind to suggest me, how to fix it?

役に立ちましたか?

解決

It seems clear from the error message that you are attempted to compile the file python-bindings.c, but that file doesn't exist in your current directory, probably because you are running the setup.py script from somewhere else.

So you should first cd /Users/USRName/Documents/suffix_tree-2.1/ then run python setup.py.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top