π导航  


【首页】

安装anaconda、python和jupyter


【2020-04-12】 人工智能】


直接从官网下载

创建环境

conda create -n xxx Python=3. 7

进入新环境

conda activate xxx

安装

conda install tensorflow

【install tensor flow—gpu】不需要

conda install jupyter notebook

conda install matplotlib

conda install scikit-learn

conda install scikit-image

conda install opencv

conda install pillow

conda install tqdm

下面的安装很必要,可以正确运行gpu

安装torchvision

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

pytorch的安装类似

conda install pytorch

创建配置文件

(torch) C:Users504>jupyter notebook --generate-config

Writing default config to: C:Users504.jupyterjupyter_notebook_config.py

修改目录生效

在win开始菜单中找到jupyter notebook快捷图标,鼠标右键>>属性>>快捷方式>>目标

删除最后的 "%USERPROFILE%/" 。

设置参数

包括密码,端口,屏蔽button

路径设置

nginx

反向代理

**c.NotebookApp.allow_origin = ´*´

**

c.NotebookApp.allow_remote_access = True

**c.NotebookApp.base_url = ´/jupyter1´

**

**c.NotebookApp.ip = ´*´

**

**c.NotebookApp.port = 8888

**

**c.NotebookApp.notebook_dir = ´c:me´

**

**c.NotebookApp.disable_check_xsrf = True

**

**c.NotebookApp.password =´sha1:6be707b302cf:609c7425a18502e1dad0b6dbf7d54efa196358dd´

**

**c.NotebookApp.quit_button = False

**

**c.NotebookApp.terminals_enabled= False

**


Terminals may also be automatically disabled if the terminado package is not

available. 去掉shell权限

c.NotebookApp.terminals_enabled = False



              

copyright©2018-2024 gotopie.com