当前位置: 首页 > news >正文

长沙网站排名团队正邦高端网站建设

长沙网站排名团队,正邦高端网站建设,邀请专家集体会诊网站建设,南京医院网站建设FreeBSD下不能直接安装g4f,因为Curl_cffi这个库装不上。0.5.0.3这个版本不需要这个库,所以可以安装。 那么就没有办法安装新版本了吗? 有的,就是在linux仿真环境下。 Linux仿真环境安装g4f 最简单的方法是使用chroot进入linux仿…

FreeBSD下不能直接安装g4f,因为Curl_cffi这个库装不上。0.5.0.3这个版本不需要这个库,所以可以安装。

那么就没有办法安装新版本了吗? 有的,就是在linux仿真环境下。

Linux仿真环境安装g4f

最简单的方法是使用chroot进入linux仿真环境,然后在里面安装新版本的g4f

# 进入linux仿真环境
sudo chroot /compact/ubuntu22 /bin/bash# 启动python环境
source ub22py312/bin/activate 
pip install pip -U
pip install g4f[all] -U
g4f gui

这个方法下成功安装了最新版本的0.5.7.3版本

但是这个方法虽然简单,使用起来却有些繁琐,需要sudo权限

在FreeBSD下安装Conda,然后在Conda环境下安装G4F

更好一点的方法,是直接在FreeBSD下安装Conda,然后在Conda环境下安装G4F

在FreeBSD下安装Conda参考:在FreeBSD14.2下安装MiniConda python3.12 ,以便安装运行Auto-Coder_freebsd conda-CSDN博客

但是现在碰到问题,就是markitdown这个库的新版本无法安装上,进而导致g4f的gui无法启动

解决依赖库markitdown

使用--no-deps

pip install markitdown==0.1.2 --no--deps

解决magika库 

这时候报:No module named 'magika'

pip install magika --no--deps

这时候报: No module named 'onnxruntime'

解决安装onnxruntime库 

发现无法用pip安装onnxruntime

FreeBSD系统里onnxruntime安装包,但是因为没有装在python下,无法用。

FreeBSD系统下还有py311的onnxruntime包,但是因为现在是python3.12环境,也无法用。

用conda命令安装onnxruntime库

conda install onnxruntime

如果速度慢,可以加镜像

创建.condarc文件

conda config --set show_channel_urls yes

在.condarc文件中加入清华镜像

channels:- defaults
show_channel_urls: true
default_channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudpytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

 安装完成,测试g4f

 g4f gui

启动成功!

浏览器浏览的8080端口,网站正常。

结论

关于在FreeBSD系统下使用f4f,如果用完全的仿真,那么很容易安装g4f

如果是conda仿真,那么onnxruntime库可能无法用pip安装,需要使用conda来看着。

调试

用conda安装markitdown的时候,报错RemoveError: 'pluggy'

Verifying transaction: failed                                                         
                                                                                      
RemoveError: 'pluggy' is a dependency of conda and cannot be removed from             
conda's operating environment.                                                        
                                  

pip uninstall pluggy

最终解决见后面隔一个问题。 

删除pluggy后报错conda info could not be constructed.(不应该删除,这步可以跳过)

conda info could not be constructed.
KeyError('active_prefix_name')

An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.
执行

conda --no-plugins install markitdown[all]

不行。不得已,又把pluggy安装上

pip install pluggy

conda装什么都报错RemoveError: 'pluggy'

尝试强制重装核心

conda update conda --force-reinstall  # 强制重装Conda核心组件‌:ml-citation{ref="1,3" data="citationList"}

不行

切换清华源解析

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/‌:ml-citation{ref="6" data="citationList"}
conda update --all --channel defaults  # 优先使用默认通道‌:ml-citation{ref="5,6" data="citationList"}

哇塞,终于搞定了!

问题的原因,有可能是切换清华源,但没有切换干净.....

http://www.dtcms.com/a/476291.html

相关文章:

  • 奉贤区做网站微信小程序是什么框架
  • 手机微网站尺寸做网站属于什么技术
  • 网站建设 后期维护网页制作培训总结
  • 广州网站建设有限公司中国物联网企业排名
  • 网站域名证书网络设计报告模板
  • 网站推广方案模板绵阳微网站制作
  • 网站建设的小结资讯cms网站有那些
  • 自己做影视类网站常用的网页制作工具有什么
  • 淄博著名网站开发方法网站开发免责说明
  • 如何修改asp网站黄山旅游攻略自驾游
  • php能区别电脑网站和手机网站吗怎么嵌入到phpcms潍坊mip网站建设
  • 东莞高埗网站建设企业网站升级
  • 天津注册公司网站建设个人网站需要什么条件
  • 做外贸兼职的网站有哪些国际网站如何推做推广
  • 中国品牌建设促进会网站湘潭网站建设 水平磐石网络
  • 给单位做网站需要备案吗wordpress登录后台
  • 江苏省城乡建设官网站信阳市住房建设局网站
  • 开源网站下载网页游戏网址
  • 白城百度网站建设开发一款游戏能赚多少钱
  • 如何自建购物网站360免费wifi
  • 上传产品网站怎么做的为什么要给企业建设网站
  • 网站的布局方式有哪些ui交互设计是什么
  • 谷歌网站排名工程建设科学技术奖申报网站
  • 餐饮网站欣赏建站工具推荐
  • vs网站模板中国的网站做欧美风
  • 微网站 文章wordpress默认头像不显示
  • 空调网站模版品牌vi设计机构
  • 网站营销策划搭建微网站平台
  • 网站怎么做优化推广东南融通网站建设
  • 蓝鸟E4A做网站程序公司网站制作有哪些