使用云服务器如何在网页上运行python
很多小伙伴想知道如何在网页上运行python,下面给大家介绍一下:
需要打开端口而端口是在网页端开放的,命令行防火墙是默认关闭。所以,需要在网页端管理网络端口,需要打开8888,这些都是程序默认端口,否则无法成功
安装bioconda
#1下载bioconda
wget https://continuum.io/miniconda/Miniconda3-latest-Linux- 64sh#2安装
S H miniconda3-latest-linux-x8664.sh
source ~/.bashrc
#3添加软件源
CONDA config --add channel
CONDA CONFIG-- add channels Conda-forge
#安装mamba
conda install -y mamba
安装 jupyterlab
#juypterlab
CONDA Safety c conda-forge jupyterlab
mamba install -c conda-forge voila
#中文插件MambaInstallation-y JUPyterlab-Language-Pack-zh-CN
jupyter notebook password
生成配置文件
Jupyter notebook - generate configuration
修改配置文件
VIM/ROOT/.Jupyter/ jupyter notebook configuration.py
c.ServerApp.port =8888
C. serverappt.Allow remote access =true
c.ServerApp.ip=‘*‘
c.ServerApp.open_browser=False
启动 jupyterlab
Nohup jupyter laboratory – root