win10安装streamlit软件包

42 篇文章 3 订阅
17 篇文章 0 订阅

    streamlit是一个开源的python语言的web前端框架,常用于机器学习、数据分析、数据展示等。使用streamlit可以非常方便的创建网页、图表、Markdown文档。这里介绍在win10的Anaconda里安装streamlit软件包。

1、安装Anaconda

    安装方法请看这篇文章: Anaconda设置环境变量与镜像源

2、创建python 3.9虚拟环境

## 创建python v3.9虚拟环境
conda create -n py39 python=3.9
yes

## 激活 python v3.9 (win10使用)
conda activate py39

## 激活 python v3.9 (Mac或Linux使用)
source activate py39

3、设置PIP镜像源

## 进入py39虚拟环境
activate py39

## 设置pip镜像源
pip config set global.index==url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted==host https://mirrors.aliyun.com

4、下载streamlit

4.1 方法一 直接安装

pip install streamlit==1.2.0

4.2 方法二 使用require.txt进行安装

    streamlit需要的依赖包和自身包,如下:
    //require.txt

altair==4.1.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
astor==0.8.1
attrs==21.2.0
backcall==0.2.0
base58==2.1.1
bleach==4.1.0
blinker==1.4
cachetools==4.2.4
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.9
click==7.1.2
colorama==0.4.4
debugpy==1.5.1
decorator==5.1.0
defusedxml==0.7.1
entrypoints==0.3
gitdb2==3.0.3.post1
GitPython==3.0.9
idna==3.3
ipykernel==6.6.0
ipython==7.30.1
ipython-genutils==0.2.0
ipywidgets==7.6.5
jedi==0.18.1
Jinja2==3.0.3
jsonschema==4.3.2
jupyter-client==7.1.0
jupyter-core==4.9.1
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.2
MarkupSafe==2.0.1
matplotlib-inline==0.1.3
mistune==0.8.4
nbclient==0.5.9
nbconvert==6.3.0
nbformat==5.1.3
nest-asyncio==1.5.4
notebook==6.4.6
numpy==1.21.5
packaging==21.3
pandas==1.3.4
pandocfilters==1.5.0
parso==0.8.3
pickleshare==0.7.5
Pillow==8.4.0
prometheus-client==0.12.0
prompt-toolkit==3.0.24
protobuf==3.19.1
pyarrow==5.0.0
pycparser==2.21
pydeck==0.7.1
Pygments==2.10.0
Pympler==1.0
pyparsing==3.0.6
pyrsistent==0.18.0
python-dateutil==2.8.2
pytz==2021.3
pytz-deprecation-shim==0.1.0.post0
pywin32==303
pywinpty==1.1.6
pyzmq==22.3.0
requests==2.26.0
Send2Trash==1.8.0
six==1.16.0
smmap2==2.0.5
terminado==0.12.1
testpath==0.5.0
toml==0.10.1
toolz==0.11.2
tornado==6.1
traitlets==5.1.1
tzdata==2021.5
tzlocal==4.1
urllib3==1.26.7
validators==0.18.2
watchdog==2.1.6
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.2
streamlit==1.2.0

    将require.txt保存到C:\Users\用户名\AppData\Roaming\pip目录下,然后在CMD里,依次输入如下命令:

## 激活py39环境
activate py39

## 进入require.txt所在的目录
C:
cd C:\Users\hua\AppData\Roaming\pip

## 根据require.txt进行安装
pip install -r require.txt

参考文献

    [1] streamlit安装手册

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值