Screenshot-to-code开源项目mac上实践

github上的开源项目,看介绍可以将设计ui图片转换为 HTML 和 CSS

源码地址:

GitCode - 开发者的代码家园

我的mac安装了2.7和3.11,就用3吧直接上代码

安装 pip3 install keras tensorflow pillow h5py jupyter

报错

ERROR: Could not install packages due to an OSError: Errno 13 Permission denied: '/Users/xxx/Library/Python/3.11'

Check the permissions.

mac-xxxdeMacBook-Pro:bin xxx$ sudo pip3 install keras tensorflow pillow h5py jupyter

Password:

WARNING: The directory '/Users/xxx/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.

解决办法

sudo pip3 install keras tensorflow pillow h5py jupyter

安装好了

tensorboard-data-server-0.7.2 tensorflow-2.15.0 tensorflow-estimator-2.15.0 tensorflow-io-gcs-filesystem-0.35.0 termcolor-2.4.0 terminado-0.18.0 tinycss2-1.2.1 tornado-6.4 traitlets-5.14.0 types-python-dateutil-2.8.19.14 typing-extensions-4.9.0 uri-template-1.3.0 urllib3-2.1.0 wcwidth-0.2.12 webcolors-1.13 webencodings-0.5.1 websocket-client-1.7.0 werkzeug-3.0.1 wheel-0.42.0 widgetsnbextension-4.0.9 wrapt-1.14.1

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

执行运行

jupyter notebook

启动成功

自动打开浏览器,url为http://localhost:8888/tree界面如下图

接下来怎么搞?欢迎评论区讨论

相关推荐
2601_9623004731 分钟前
python是跨平台的吗
python·开源·跨平台·面向对象·
yu俞娥宝1 小时前
DeepSeek Harness 开源贡献手记:参与AI智能体框架共建的实战与成长
人工智能·开源
冬奇Lab12 小时前
一天一个开源项目(第216篇):OpenViking - 给 AI Agent 装上可自进化的上下文数据库
人工智能·开源·资讯
TunerT_TQ19 小时前
Netflix|一个时代的终结:Hystrix静态工程评测,兼谈微服务容错范式的代际迁移
开源·github·资讯
莫生灬灬19 小时前
灵码 LingBuilder:用中文写代码,确定性生成真实 C++ 工程(开源)
c++·开源·mfc
萧鼎19 小时前
2026实战:用 accelerate 库加速 PyTorch 训练,核心语法与避坑指南
python·开源·教程·python库·accelerate
m4Rk_19 小时前
【论文阅读】Agent 记忆机制(68):Memp——把历史轨迹沉淀为可检索、可纠错的程序性记忆
论文阅读·人工智能·学习·开源·github
a11177620 小时前
莱茵生命终端 网页 html
前端·开源
2601_9683545421 小时前
DeepSeek Harness 开源贡献手记:从 Issue 到 Merge 的完整旅程
开源·issue
海盗123421 小时前
AI 新闻日报 2026-09-12:Agents API 公测、AI Agent 军团攻击事件、龙猫 2.0 万亿开源
人工智能·开源