V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Alfons  ›  全部回复第 1 页 / 共 3 页
回复总数  56
1  2  3  
70 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 再试一下,更新 docker 镜像再试试
70 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 有些问题,我再看看
70 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 留个邮箱吧,我发你😂
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@ruanimal 针对的场景不一样,试了很多 python 虚拟环境打包的方案,确实没办法解决所有的依赖问题,才启动的这个项目
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 完整的 requirements.txt 发一下呢
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 应该还是网络的问题,我这边是可以的

+++++++++++++++++安装项目第三方依赖包+++++++++++++++++
[ OK ]: Execute cmd -> source /usr/local/python3/3.9.0/alfonstest/bin/activate && export LD_LIBRARY_PATH=/usr/local/python3/3.9.0/alfonstest/main/lib:$LD_LIBRARY_PATH && pip install --upgrade pip && pip install -r /packages/requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pip
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/15/aa/3f4c7bcee2057a76562a5b33ecbd199be08cdb4443a02e26bd2c3cf6fc39/pip-23.3.2-py3-none-any.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 512 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.3
Uninstalling pip-20.2.3:
Successfully uninstalled pip-20.2.3
Successfully installed pip-23.3.2
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Etuloser 无外网访问,虚拟环境中的动态库依赖的 glibc ,不同操作系统难以通用
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 嗯嗯,不客气。

你应该是机器上的环境问题,刚在我自己环境上是可以打出来的

[root@0d315fcc076b alfonstest]# source /usr/local/python3/3.9.0/alfonstest/bin/activate
(alfonstest) [root@0d315fcc076b alfonstest]# python --version
Python 3.9.0
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@Geekerstar 是在本地 Docker desktop 里设置 了 容器 proxy 吗
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@MasterCai 试过很多方案,没办法解决动态库 glibc 依赖的问题
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
docker run -it --rm --platform linux/amd64 \
-v `pwd`/test/Python:/packages/Python \
-v `pwd`/test/requirements.txt:/packages/requirements.txt \
-v `pwd`/test/build:/packages/build alfonsxh/py-all-in-one:latest --install-dir /usr/local/python_env/ --project alfonstest --python-version 3.8.18


docker 参数:

- --platform linux/amd64 - 平台可以选 linux/amd64 、linux/arm64
- `pwd`/test/Python - Python 安装包位置,打包前需要将 Python 源码下载保存在该目录。源码下载地址: https://www.python.org/ftp/python/ (当前只支持 tgz 包)
- `pwd`/test/requirements.txt - 项目依赖的 Python 模块
- `pwd`/test/build - 打完包后,保存的目录

命令参数:

--install-dir - Python 环境安装的目录,对应在部署机器上的路径
--project - 项目名称,虚拟环境会生成在 {install-dir}/{python_version}/{project} 目录下
--python-version - Python 版本,根据 pwd/test/Python 目录下的 Python 源码包进行选择。暂时只支持先下载 Python 源码的方式
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@jackOff 可以的,一会补充使用方案
71 天前
回复了 Alfons 创建的主题 Python Python 虚拟环境 打包 py-all-in-one
@gumuxi 我接触的很多企业用户,还是很保守的,接受不了 docker 这种方案
2019-10-15 09:03:03 +08:00
回复了 peterswan 创建的主题 程序员 想入手一个树霉派 4,但是害怕吃灰。
做个 Android TV,看电视
2019-09-01 18:38:25 +08:00
回复了 Alfons 创建的主题 程序员 国庆+十日+海南+环岛+骑行
@different 嗯嗯,多谢提醒
2019-08-19 15:04:08 +08:00
回复了 monkeyk 创建的主题 程序员 "中午不睡,下午崩溃“
me
2019-08-15 11:02:21 +08:00
回复了 sadfQED2 创建的主题 程序员 内心崩溃,心态爆炸
分布式编译,了解一下
2019-08-12 09:43:40 +08:00
回复了 Alfons 创建的主题 程序员 替我的一个朋友问的:国内植发哪家强?:) (II)
@fivestrong 原帖已经被淹没了,发个 2.0 版本
2019-08-12 09:42:42 +08:00
回复了 Alfons 创建的主题 程序员 替我的一个朋友问的:国内植发哪家强?:) (II)
@saozhu 可以看原帖
2019-08-11 22:37:59 +08:00
回复了 Alfons 创建的主题 程序员 替我的一个朋友问的:国内植发哪家强?:) (II)
大家先看看原帖吧~
1  2  3  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1058 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 22:40 · PVG 06:40 · LAX 15:40 · JFK 18:40
Developed with CodeLauncher
♥ Do have faith in what you're doing.