无法在Mac OS上安装sikuli到PyCharm

时间:2014-10-05 18:51:11

标签: python macos sikuli

当我尝试在终端上安装sikuli时

sudo pip install sikuli

我收到错误:

    Michaels-macbook:~ mkurganskiy$ sudo pip install sikuli
Password:
Downloading/unpacking sikuli
  Downloading sikuli-0.1.tar.gz (17.4MB): 17.4MB downloaded
  Running setup.py egg_info for package sikuli

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                if py_arg is None:
                    j_args[index].l = NULL
                elif isinstance(py_arg, basestring) and \
                        argtype in ('Ljava/lang/String;', 'Ljava/lang/Object;'):
                    j_args[index].l = j_env[0].NewStringUTF(
                            j_env, <char *><bytes>py_arg.encode('utf-8'))
                                  ^
    ------------------------------------------------------------

    jnius/jnius_conversion.pxi:54:31: Casting temporary Python object to non-numeric non-Python type
    jnius/jnius.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation.
    #error Do not use this file, it is the result of a failed Cython compilation.
     ^
    1 error generated.
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/private/tmp/pip_build_root/sikuli/setup.py", line 39, in <module>
        'Development Status :: 4 - Beta'
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 239, in __init__
      File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 263, in fetch_build_eggs
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 568, in resolve
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 806, in best_match
      File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 818, in obtain
      File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 313, in fetch_build_egg
      File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 609, in easy_install
      File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 639, in install_item
      File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 825, in install_eggs
      File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1031, in build_and_install
      File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1019, in run_setup
    distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
    Complete output from command python setup.py egg_info:


Error compiling Cython file:

------------------------------------------------------------

...

            if py_arg is None:

                j_args[index].l = NULL

            elif isinstance(py_arg, basestring) and \

                    argtype in ('Ljava/lang/String;', 'Ljava/lang/Object;'):

                j_args[index].l = j_env[0].NewStringUTF(

                        j_env, <char *><bytes>py_arg.encode('utf-8'))

                              ^

------------------------------------------------------------



jnius/jnius_conversion.pxi:54:31: Casting temporary Python object to non-numeric non-Python type

jnius/jnius.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation.

#error Do not use this file, it is the result of a failed Cython compilation.

 ^

1 error generated.

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/private/tmp/pip_build_root/sikuli/setup.py", line 39, in <module>

    'Development Status :: 4 - Beta'

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 239, in __init__

  File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 263, in fetch_build_eggs

  File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 568, in resolve

  File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 806, in best_match

  File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 818, in obtain

  File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 313, in fetch_build_egg

  File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 609, in easy_install

  File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 639, in install_item

  File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 825, in install_eggs

  File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1031, in build_and_install

  File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1019, in run_setup

distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/sikuli
Storing complete log in /Users/mkurganskiy/Library/Logs/pip.log

我做了一些更改并编辑了错误信息。

0 个答案:

没有答案