如何在Streamlit托管平台中更新pip

huangapple go评论61阅读模式
英文:

How to update pip in streamlit hosting platform

问题

我已经创建了一个非常小的Web应用程序,它在其后端使用了机器学习模型。我尝试通过Streamlit托管平台来托管这个应用程序。

但最初我遇到了一个错误,提示找不到模块,所以我将模块列表放入了requirements.txt文件中。

但当Streamlit尝试安装这些模块并遇到tensorflow时,它会抛出一个错误,要求更新pip,因为它使用的是较旧版本的pip。

我已经确认了两次我在本地计算机上运行的是最新版本的pip,现在我该如何让Streamlit使用最新版本的pip来成功安装tensorflow呢?

我对Python和机器学习都很陌生,所以请以易于理解的方式解释。

非常欢迎任何回应。

英文:

I have created a very small web application which uses machine learning model in its backend, I tried to host the application through streamlit hosting platform,

But initially i got a error saying modules not found so I put in the list of modules in requirements.txt

But when streamlit tries to install the modules and encounters tensorflow, it throws an error asking to update pip since it uses an older version of pip

I have verified twice that I run the latest version of pip in my local computer now how can I make streamlit use the latest version of pip to install tensorflow successfully

I am new to python and machine learning so please explain in an easy to understand way

Any response is at most welcomed.

答案1

得分: 1

尝试将以下内容添加到您的代码中,然后重新部署到Streamlit Hosting:

!pip install --upgrade pip
英文:

Try adding the following to your code and redeployment it to Streamlit Hosting:

!pip install --upgrade pip

huangapple
  • 本文由 发表于 2023年2月16日 15:07:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/75468863.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定