GraphLab Create/Canopy运行时异常。无法计算lambdas。

2024-09-30 10:33:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是安装在Win7 Pro上的GraphLab Create+Enthough Canopy Express

(Canopy 64bit) C:\Users\kittuNnivvi>python
Enthought Canopy Python 2.7.9 | 64-bit | (default, Jul  1 2015, 03:41:50) [MSC v
.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

下面是我如何安装GraphLab Create

^{pr2}$

我在IPython Notebook内部使用它。在

以下命令有效。在

sf = graphlab.SFrame.read_csv('people-example.csv')

sf['Country'].show  

def transform_country(country):
    if country == "USA":
        return 'United States'
    else:
        return country

transform_country('USA')

当我运行以下代码时-

sf['Country'] = sf['Country'].apply(transform_country)

我得到运行时异常

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-28-58b2d3ea026a> in <module>()
----> 1 sf['Country'].apply(transform_country)

C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\data_structures\sarray.pyc in apply(self, fn, dtype, skip_undefined, seed)
   1624 
   1625         with cython_context():
-> 1626             return SArray(_proxy=self.__proxy__.transform(fn, dtype, skip_undefined, seed))
   1627 
   1628 

C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\cython\context.pyc in __exit__(self, exc_type, exc_value, traceback)
     47             if not self.show_cython_trace:
     48                 # To hide cython trace, we re-raise from here
---> 49                 raise exc_type(exc_value)
     50             else:
     51                 # To show the full trace, we do nothing and let exception propagate

RuntimeError: Runtime Exception. Unable to evaluate lambdas. lambda workers did not start

我是新GraphLab Create-请帮忙。它看起来确实是由环境设置引起的。我在这个论坛上读过其他帖子。在

我运行了graphlab.get_runtime_config()-在其他函数中,它返回了 GRAPHLAB_CACHE_FILE_LOCATIONS。以下是服务器日志文件中的a部分。在

1444236358 : ERROR:    (operator():272): Min value not available for a non-numeric column
1444236358 : INFO:     (commit_global_if_out_of_date:515): num elements: 0  rows_processed: 7   time:0.005
1444236631 : INFO:     (new_cache:157): Cache Utilization:139264
1444236631 : INFO:     (delete_path_impl:299): Deleting cache://tmp/000048.0000
1444236631 : INFO:     (delete_path_impl:299): Deleting cache://tmp/000048.sidx
1444236632 : INFO:     (transform:396): Function entry
1444236632 : INFO:     (spawn_worker:40): Start lambda worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/11a47be5-ab46-462f-a895-329814281fa7 using binary: C:/Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\pylambda_worker.exe
1444236632 : INFO:     (spawn_worker:40): Start lambda worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/31e984ce-a9ac-4566-b7be-e38f01086483 using binary: C:/Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\pylambda_worker.exe
1444236632 : INFO:     (spawn_worker:40): Start lambda worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/74ab5626-299c-4c9d-98a2-4eda85468f0d using binary: C:/Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\pylambda_worker.exe
1444236632 : INFO:     (spawn_worker:40): Start lambda worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/a53be544-851a-4a15-bf47-ba74f74b2857 using binary: C:/Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\pylambda_worker.exe
1444236633 : INFO:     (launch:76): Launched process with pid: 46684
1444236633 : INFO:     (launch:76): Launched process with pid: 57468
1444236633 : INFO:     (launch:76): Launched process with pid: 47452
1444236633 : INFO:     (launch:76): Launched process with pid: 57372
1444236668 : INFO:     (spawn_worker:71): Fail connecting to worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/31e984ce-a9ac-4566-b7be-e38f01086483. Status: Communication Failure. Retry: 1
1444236668 : INFO:     (spawn_worker:71): Fail connecting to worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/74ab5626-299c-4c9d-98a2-4eda85468f0d. Status: Communication Failure. Retry: 1
1444236668 : INFO:     (spawn_worker:71): Fail connecting to worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/11a47be5-ab46-462f-a895-329814281fa7. Status: Communication Failure. Retry: 1
1444236668 : INFO:     (spawn_worker:71): Fail connecting to worker at ipc://C:/Users/KITTUN~1/AppData/Local/Temp/graphlab-kittuNnivvi/51684/a53be544-851a-4a15-bf47-ba74f74b2857. Status: Communication Failure. Retry: 1
1444236669 : ERROR:    (spawn_worker:54): Lambda worker process terminated unexpectedly
1444236669 : ERROR:    (spawn_worker:54): Lambda worker process terminated unexpectedly
1444236669 : ERROR:    (operator():141): Fail launching lambda worker.
1444236669 : ERROR:    (operator():141): Fail launching lambda worker.
1444236669 : ERROR:    (spawn_worker:54): Lambda worker process terminated unexpectedly
1444236669 : ERROR:    (operator():141): Fail launching lambda worker.
1444236669 : ERROR:    (spawn_worker:54): Lambda worker process terminated unexpectedly
1444236669 : ERROR:    (operator():141): Fail launching lambda worker.
1444236669 : ERROR:    (operator():152): Unable to evaluate lambdas. lambda workers did not start
1444237544 : INFO:     (construct_from_csvs:115): Construct sframe from csvs at C:\edu\ml\people-example.csv
1444237544 : INFO:     (construct_from_csvs:122): Parsing config:
    comment_char: 
    continue_on_failure: 1
    delimiter: ,
    double_quote: 1
    escape_char: \
    line_terminator: 

    na_values: ["NA"]
    output_columns: []
    quote_char: "
    row_limit: 100
    skip_initial_space: 1
    skip_rows: 0
    store_errors: 0
    use_header: 1

我可以看到三个Python27.lib-它们大小相同。在

这是在我的机器上运行时的输出。在

>>> import sys
>>> print sys.path
['', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\User\\python27.
zip', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\App\\appdata\\
canopy-1.5.5.3123.win-x86_64\\DLLs', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\En
thought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.win-x86_64\\lib', 'C:\\Users\\k
ittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.w
in-x86_64\\lib\\plat-win', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\C
anopy\\App\\appdata\\canopy-1.5.5.3123.win-x86_64\\lib\\lib-tk', 'C:\\Users\\kit
tuNnivvi\\AppData\\Local\\Enthought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.win
-x86_64', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\User', 'C:
\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\User\\lib\\site-package
s', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\User\\lib\\site-
packages\\win32', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\Us
er\\lib\\site-packages\\win32\\lib', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\En
thought\\Canopy\\User\\lib\\site-packages\\Pythonwin', 'C:\\Users\\kittuNnivvi\\
AppData\\Local\\Enthought\\Canopy\\App\\appdata', 'C:\\Users\\kittuNnivvi\\AppDa
ta\\Local\\Enthought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.win-x86_64\\lib\\s
ite-packages', 'C:\\Users\\kittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\App\\
appdata\\canopy-1.5.5.3123.win-x86_64\\lib\\site-packages\\win32', 'C:\\Users\\k
ittuNnivvi\\AppData\\Local\\Enthought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.w
in-x86_64\\lib\\site-packages\\win32\\lib', 'C:\\Users\\kittuNnivvi\\AppData\\Lo
cal\\Enthought\\Canopy\\App\\appdata\\canopy-1.5.5.3123.win-x86_64\\lib\\site-pa
ckages\\Pythonwin']
>>> print sys.exec_prefix
C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User
>>> import os
>>> print os.environ['PYTHONPATH']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\App\appdata\canopy-1
.5.5.3123.win-x86_64\lib\os.py", line 425, in __getitem__
    return self.data[key.upper()]
KeyError: 'PYTHONPATH'
>>>

任何你可以提供的关于我如何解决这个问题的输入将是非常有帮助的。在


Tags: infoapplibpackageslocalsiteusersappdata

热门问题