如何使用 Graphviz 安装有效的英特尔数据科学环境

How to install a working Intel Data Science Environment with Graphviz

最近,我发现需要探索面向数据科学的英特尔 DAAL MKL,但在一个位置找到适合工作环境的正确安装时遇到了困难。经过几天的尝试和失败,我能够完成最终的安装过程,我认为这对所有其他希望开始他们的数据科学冒险的数据科学家爱好者来说都是有益的,利用 Visual Studio 代码或木星实验室。下面发布的是我在 Windows 10 上获得工作环境的推荐步骤。

1. Download and install the latest version of Anaconda: https://www.anaconda.com/distribution/
2. Download and install the latest Graphviz installer from their Web site: https://graphviz.gitlab.io/download/ (in my case, version graphviz-2.38.msi was active)
    a. Install graphviz msi for all users
    b. Navigate to Environment Variables: https://t.ly/Gz359
    c. Create a new environment path for the Graphviz (need two links to be added): (in my case it was: C:\Program Files (x86)\Graphviz2.38\bin\    and  C:\Program Files (x86)\Graphviz2.38\bin\dot.exe
    d. Close all command and environment windows
    e. Open a new cmd window and test for the existence of Graphviz:  c:\Users\MyDrive>dot -v
        i. You should get a report of the version and other info  (if it fails, check the environment path entry and possibly repair your Graphviz installation)
        ii. Ctrl-C to close the report
        iii. Close the cmd window
        iv. Reboot your PC
3. Navigate to Anaconda Command Prompt as Administrator and remain in the (base) environment:
    a. In Windows 10, Search for anaconda and select the anaconda command prompt: 
        i. Right-Click on it and select to run it as Administrator
    b. Navigate to the root of the (base) environment: 
        i. cd\
    c. Get a current list of existing environments: 
        i. conda env list
    d. Remove any unwanted environments: 
        i. conda env remove -n OldenvironmentName
    e. Create new desired environment for Intel  Data Science (ids) with the most current Conda libraries, and supported Python version 3.x:
        i. conda create -n ids python=3 numpy pandas seaborn matplotlib scikit-learn daal4py jupyterlab -y
    f. Activate the new environment:
        i.  conda activate ids
    g. Install Graphviz with pip: 
        i. pip install graphviz
    h. Install python support for Graphviz: 
        i. conda install pydot python-graphviz -y
    i. Check that dot is accessible via cmd prompt: 
        i. dot -v
    j. Ctrl-C to close the report
    k. Register the following for intel DataScience enhancements:
        i. set USE_DAAL4PY_SKLEARN=YES
        ii. python -c "import sklearn"
    l. Reboot our PC

当您return到您的桌面时,您将准备好使用您的新环境进行数据科学流程