python ide 使用
pycharm
jupyter
使用
部署到服务器
配置域名(反向代理)
*.conf文件
server { listen 80; server_name ju.iii.top; index index.php index.html index.htm default.php default.htm default.html; root /data/jupyter/root; #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则 #error_page 404/404.html; #SSL-END #ERROR-PAGE-START 错误页配置,可以注释、删除或修改 #error_page 404 /404.html; #error_page 502 /502.html; #ERROR-PAGE-END location / { proxy_pass http://127.0.0.1:8888; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 60; proxy_read_timeout 600; proxy_send_timeout 600; } #PHP-INFO-START PHP引用配置,可以注释或修改 #清理缓存规则 #引用反向代理规则,注释后配置的反向代理将无效 include /www/server/panel/vhost/nginx/proxy/ju.yiui.top/*.conf; include enable-php-00.conf; #PHP-INFO-END #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效 include /www/server/panel/vhost/rewrite/ju.yiui.top.conf; #REWRITE-END #禁止访问的文件或目录 location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) { return 404; } #一键申请SSL证书验证目录相关设置 location ~ \.well-known{ allow all; } access_log /dev/null; error_log /www/wwwlogs/ju.yiui.top.error.log; }
插件使用
#配置主题 #安装扩展 pip install jupyterthemes 升级 pip install --upgrade jupyterthemes #查看支持的主题 jt -l #更换主题 jt -t chesterish -T -N 增加一个集成插件 pip install jupyter_contrib_nbextensions jupyter contrib nbextension install --user pip install jupyter_nbextensions_configurator jupyter nbextensions_configurator enable --user #杀死当前的进程 kill -9 pid #启动项目进程 nohup jupyter notebook > /data/jupyter/jupyter.log 2>&1 &