我正在使用安装在 Win 7 Pro 上的 GraphLab Create + Enthought 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 的方式
(Canopy 64bit) C:\Users\kittuNnivvi>pip install --upgrade --no-cache-dir https:/
/get.dato.com/GraphLab-Create/1.6.1/axx@xxx.xxx/AAAA-BBBB-CCCC-DDDD-...-67E6/GraphLab-Create-License.tar.gz
我在IPython Notebook
里面使用它Canopy Editor
。
以下命令有效。
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 创建 - 请帮助。它似乎是由环境设置引起的。我一直在阅读此论坛中的其他帖子。
我跑了graphlab.get_runtime_config()
——除其他外,它返回了
GRAPHLAB_CACHE_FILE_LOCATIONS
. 这是 server_log 文件中的一部分。
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'
>>>
您可能提供的有关我如何进一步解决此问题的任何输入都将非常有帮助。