• polynote 安装试用


    polynote 是netflix 开源的一个notebook 工具(支持scala,python,sql 。。。)

    下载安装包

    https://github.com/polynote/polynote/releases

    安装python 依赖

    • 基本
    pip3 install jep jedi pyspark virtualenv
    • 其他依赖安装(建议为安装)
    numpy pandas

    配置修改

    默认配置config-template.yml 可以拷贝修改为config.yml

    启动

    ./polynote.py

    效果

    java -cp polynote.jar:polynote.jar:/Users/dalong/Downloads/polynote/deps/portable-scala-reflect_2.12-0.1.0.jar:/Users/dalong/Downloads/polynote/deps/scala-reflect-2.12.10.jar:/Users/dalong/Downloads/polynote/deps/polynote-runtime.jar:/Users/dalong/Downloads/polynote/deps/scala-collection-compat_2.12-2.1.1.jar:/Users/dalong/Downloads/polynote/deps/polynote-spark-runtime.jar:/Users/dalong/Downloads/polynote/deps/scala-compiler-2.12.10.jar:/Users/dalong/Downloads/polynote/deps/scala-library-2.12.10.jar:/Users/dalong/Downloads/polynote/deps/scala-xml_2.12-1.2.0.jar -Djava.library.path=/usr/local/lib/python3.7/site-packages/jep polynote.Main 
    [INFO] Loading configuration from config.yml
    [INFO] Loaded configuration: PolynoteConfig(Listen(8192,127.0.0.1),Storage(tmp,notebooks,Map()),List(),List(),Map(),Map(),Behavior(true,Always,List()),Security(None),UI(/))
    [WARN] Polynote allows arbitrary remote code execution, which is necessary for a notebook tool to function.
            While we'll try to improve safety by adding security measures, it will never be completely safe to
            run Polynote on your personal computer. For example:
            - It's possible that other websites you visit could use Polynote as an attack vector. Browsing the web
              while running Polynote is unsafe.
            - It's possible that remote attackers could use Polynote as an attack vector. Running Polynote on a
              computer that's accessible from the internet is unsafe.
            - Even running Polynote inside a container doesn't guarantee safety, as there will always be
              privilege escalation and container escape vulnerabilities which an attacker could leverage.
            Please be diligent about checking for new releases, as they could contain fixes for critical security
            flaws.
            Please be mindful of the security issues that Polynote causes; consult your company's security team
            before running Polynote. You are solely responsible for any breach, loss, or damage caused by running
            this software insecurely.
    [zio-default-async-8-795372831] INFO org.http4s.blaze.channel.nio1.NIO1SocketServerGroup - Service bound to address /127.0.0.1:8192
    [zio-default-async-8-795372831] INFO org.http4s.server.blaze.BlazeServerBuilder - 
      _____ _ _
     | __  | | | |
     | |__) |__ | |_ _ _ __ ___ | |_ ___
     | ___/ _ | | | | | '_  / _ | __/ _ 
     | | | (_) | | |_| | | | | (_) | || __/
     |_| ___/|_|__, |_| |_|___/ _____|
                    __/ |
                   |___/
    Server running at http://127.0.0.1:8192
    [zio-default-async-8-795372831] INFO org.http4s.server.blaze.BlazeServerBuilder - http4s v0.20.6 on blaze v0.14.6 started at http://127.0.0.1:8192/ 
     

    访问

    地址http://localhost:8192

    一个简单的python包使用

    • 界面

    • 执行效果

    几个问题

    • No matplotlib support: No module named 'matplotlib'
      解决方法,安装依赖
    pip3 install matplotlib
    • Library not loaded: /usr/local/opt/openblas
      这个应该属于我系统的问题(brew 安装的软件包有损坏),解决方法,删除重新安装
     
    brew uninstall --ignore-dependencies openblas
    brew  install openblas

    参考资料

    https://github.com/polynote/polynote/releases
    https://polynote.org/docs/01-installation.html

  • 相关阅读:
    Oracle OMF 创建数据库
    Oracle 数据库修改数据文件
    oracle 12c 安装文档
    mysql5.7 多次增量备份及恢复测试
    Mysql 数据库模拟误操作基于binlog恢复
    基于scn号恢复oracle数据库测试
    读源码 | metisMenu侧边栏插件
    JavaScript | JQuery插件定义方法
    JavaScript | 模拟文件拖选框样式 v1.0
    JavaScript | JSON基本格式
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/11976269.html
Copyright © 2020-2023  润新知