除錯經驗——GraphLab Create的安裝
萬事開頭難,為了匯入GraphLab包,花了我兩個多小時。
問題描述:
在Jupyter Notebook 中執行import graphlab命令後,出現以下提示:
“
ACTION REQUIRED: Dependencies libstdc++-6.dll and libgcc_s_seh-1.dll not found.
1. Ensure user account has write permission to C:\Users\pande\Anaconda2\envs\gl-env\lib\site-packages\graphlab
2. Run graphlab.get_dependencies() to download and install them.
3. Restart Python and import graphlab again.
By running the above function, you agree to the following licenses.
* libstdc++:
* xz:
http://git.tukaani.org/?p=xz.git;a=blob;f=COPYING
“
然後,按照提示,執行graphlab.get_dependencies()命令,結果又出現以下錯誤:
“
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-2-c9bb182d1ed0>
”
然後,就沒轍了。
只能求助於萬能的網際網路了。
以下文章對我幫助很大:
http://blog.csdn.net/u013569000/article/details/53886656
於是,按照這篇文章提供的方法,手動更新了dependencies.py檔案,在Python Terminal (命令列工具,而不是Jupyter Notebook)中執行graphlab.get_dependencies()命令,終於成功了。
Welcome to the GraphLab Create Terminal
This terminal gives you access to the 'gl-env' Python environment
where GraphLab Create and other useful packages, such as IPython and
Jupyter Notebook, have been installed. Use 'conda' or 'pip' to manage
packages for development.
Your gl-env environment has been activated using the following command:
activate gl-env
To get started, type the commands 'ipython' and then 'import graphlab'.
To open Jupyter Notebook, type 'jupyter notebook'.
[gl-env] C:\Users\pande>python
Python 2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import graphlab
ACTION REQUIRED: Dependencies libstdc++-6.dll and libgcc_s_seh-1.dll not found.
1. Ensure user account has write permission to C:\Users\pande\Anaconda2\envs\gl-env\lib\site-packages\graphlab
2. Run graphlab.get_dependencies() to download and install them.
3. Restart Python and import graphlab again.
By running the above function, you agree to the following licenses.
* libstdc++: https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
* xz: http://git.tukaani.org/?p=xz.git;a=blob;f=COPYING
>>> graphlab.get_dependencies()
By running this function, you agree to the following licenses.
* libstdc++: https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
* xz: http://git.tukaani.org/?p=xz.git;a=blob;f=COPYING
Downloading xz.
Extracting xz.
Downloading gcc-libs.
Extracting gcc-libs.
Copying gcc-libs into the installation directory.
>>>
經驗:
1. 在Jupyter Notebook中鍵入命令,如果出錯後,後續的命令往往得不到反饋(沒反應)或者得不到正確的反饋。需要不斷的重啟Jupyter Notebook。感覺Jupyter Notebook的容錯能力很有限。
2. 在Jupyter Notebook中鍵入命令時,似乎沒有重新編譯.py檔案,導致對.py的更新沒有反映出來,依然報錯。
3. 在Python命令列中執行graphlab.get_dependencies()時,重新編譯了.py檔案,得到了更新後的.pyc檔案。