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

无锡阿凡达网站建设惠城网站设计

无锡阿凡达网站建设,惠城网站设计,博客网站开发框架,专业做家电经销的网站centos 7.9 下利用miniconda里的pyinstaller打包python程序为二进制文件操作方法 一.centos 7.9 操作系统安装 参考:https://blog.csdn.net/qq_46015509/article/details/134572030?utm_sourceminiapp_weixin 安装完成后用后台连接工具连上虚拟机 二.安装python3 …

centos 7.9 下利用miniconda里的pyinstaller打包python程序为二进制文件操作方法

一.centos 7.9 操作系统安装

参考:https://blog.csdn.net/qq_46015509/article/details/134572030?utm_source=miniapp_weixin
安装完成后用后台连接工具连上虚拟机

在这里插入图片描述

二.安装python3

0x01. 下载安装相关依赖库(需要连通互联网)
sudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc libffi-devel

在这里插入图片描述

0x02.下载Python3得安装包到本地,此处使用Python-3.9.15.tgz安装包
wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
如果出现虚拟机内下载很慢的情况,可以直接宿主机访问https://www.python.org/ftp/python/站点进行下载你想要的安装包

在这里插入图片描述

0x03.解压初始化编译安装,以及创建软连接
解压:tar -zvxf Python-3.9.15.tgz

在这里插入图片描述

切到解压之后的目录:cd Python-3.9.15/
初始化配置:./configure --prefix=/usr/local/python3

在这里插入图片描述

编译安装: make && make install

在这里插入图片描述

做软链接:ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

在这里插入图片描述

检查Python3是否安装成功 :python3 -v

在这里插入图片描述

三.更新yum,安装Miniconda进行初始化配置,使用conda安装pyinstaller,以及更新pip相关应用程序

yum update

在这里插入图片描述

安装Miniconda:
<1>.下载:wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

在这里插入图片描述

<2>.赋权并执行:chmod 777 Miniconda3-latest-Linux-x86_64.sh && ./Miniconda3-latest-Linux-x86_64.sh
<3>.一路enter,直到来到<Do you accept the license terms?>,输入yes,enter回车

在这里插入图片描述
在这里插入图片描述

<4>.来到指定安装目录,在箭头处输入默认路径/root/miniconda3,enter回车,等待安装完成,最后一个来到<You can undo this by running conda init --reverse $SHELL? [yes|no]>,输入默认的no回车即可,至此Miniconda安装完了

在这里插入图片描述在这里插入图片描述在这里插入图片描述

把conda命令放到配置文件中:vim ~/.bashrc
在最下面一行加上 export PATH=/root/miniconda3/bin:$PATH,保存退出
执行source ~/.bashrc
验证conda命令是否可用: conda info

在这里插入图片描述在这里插入图片描述

在conda里安装你得python程序运行所需的模块
我这里安装flask和pymysql
0x01.conda install flask
0x02.conda install pymysql

在这里插入图片描述
在这里插入图片描述

更新Miniconda里面的pip: pip install --upgrade pip

在这里插入图片描述

更新下载Miniconda里面的pyinstaller: pip install pyinstaller -i https://mirror.baidu.com/pypi/simple

在这里插入图片描述

更新下载pyinstaller相关引用程序:pip install auto-py-to-exe -i https://mirror.baidu.com/pypi/simple
至此Pyinstaller相关安装和更新就结束了,下面演示具体用法

在这里插入图片描述

四.pyinstaller打包工具用法

pyinstaller -F apply.py
(–hidden-import 导入模块)
pyinstaller -F --hidden-import=flask --hidden-import=pymysql --hidden-import=json app.py
打包之后生成的二进制文件在dist目录下

在这里插入图片描述在这里插入图片描述

nohup ./apply > nohup.log &
把二进制文件放到后台执行,把执行日志导入到nohup.log里面
cat nohup.log

在这里插入图片描述在这里插入图片描述

在这里顺带提一下windows上的Python程序打包为可执行文件打包方法
pip install pyinstaller

在这里插入图片描述

(–add-data导入当前目录下的其他依赖文件)
pyinstaller -F cy_interfaces.py --add-data “XXX.py;.”
这个可执行文件得在cmd命令行中执行

在这里插入图片描述在这里插入图片描述在这里插入图片描述


文章转载自:
http://symmetrize.rwzc.cn
http://pit.rwzc.cn
http://preoperative.rwzc.cn
http://puddly.rwzc.cn
http://weal.rwzc.cn
http://woald.rwzc.cn
http://medial.rwzc.cn
http://acapulco.rwzc.cn
http://sermonology.rwzc.cn
http://multicollinearity.rwzc.cn
http://autogamous.rwzc.cn
http://pandemoniac.rwzc.cn
http://shaky.rwzc.cn
http://rural.rwzc.cn
http://citrous.rwzc.cn
http://honestly.rwzc.cn
http://vlcc.rwzc.cn
http://dispersibility.rwzc.cn
http://sadducee.rwzc.cn
http://thermolabile.rwzc.cn
http://khalkhas.rwzc.cn
http://morbifical.rwzc.cn
http://texas.rwzc.cn
http://satanology.rwzc.cn
http://calorie.rwzc.cn
http://chevet.rwzc.cn
http://skepticize.rwzc.cn
http://raceball.rwzc.cn
http://transversely.rwzc.cn
http://pentahedral.rwzc.cn
http://plumbaginaceous.rwzc.cn
http://unthink.rwzc.cn
http://epilepsy.rwzc.cn
http://drupe.rwzc.cn
http://lathe.rwzc.cn
http://felicity.rwzc.cn
http://encina.rwzc.cn
http://monuron.rwzc.cn
http://sesquipedalian.rwzc.cn
http://hexose.rwzc.cn
http://ascariasis.rwzc.cn
http://whaler.rwzc.cn
http://swinish.rwzc.cn
http://oreo.rwzc.cn
http://euclidean.rwzc.cn
http://electroencephalogram.rwzc.cn
http://empyema.rwzc.cn
http://psychiatry.rwzc.cn
http://theonomy.rwzc.cn
http://spheroidal.rwzc.cn
http://winglike.rwzc.cn
http://servantgirl.rwzc.cn
http://nasdaq.rwzc.cn
http://midsummer.rwzc.cn
http://jingled.rwzc.cn
http://proline.rwzc.cn
http://wasteland.rwzc.cn
http://shittah.rwzc.cn
http://outrecuidance.rwzc.cn
http://bested.rwzc.cn
http://unconformable.rwzc.cn
http://deathrate.rwzc.cn
http://massiliot.rwzc.cn
http://msls.rwzc.cn
http://kingly.rwzc.cn
http://fraenulum.rwzc.cn
http://polaris.rwzc.cn
http://monanthous.rwzc.cn
http://pize.rwzc.cn
http://pignorate.rwzc.cn
http://advertize.rwzc.cn
http://inexplainable.rwzc.cn
http://arioso.rwzc.cn
http://hotdog.rwzc.cn
http://deficit.rwzc.cn
http://dispersedness.rwzc.cn
http://lumpsucker.rwzc.cn
http://hieland.rwzc.cn
http://amos.rwzc.cn
http://rutile.rwzc.cn
http://quadrifrontal.rwzc.cn
http://caprylic.rwzc.cn
http://censorious.rwzc.cn
http://quadrinomial.rwzc.cn
http://mam.rwzc.cn
http://mansion.rwzc.cn
http://alcayde.rwzc.cn
http://pterosaurian.rwzc.cn
http://titular.rwzc.cn
http://preface.rwzc.cn
http://linuron.rwzc.cn
http://amd.rwzc.cn
http://in.rwzc.cn
http://peroxidation.rwzc.cn
http://photoenvironment.rwzc.cn
http://salsify.rwzc.cn
http://tourcoing.rwzc.cn
http://supercharge.rwzc.cn
http://tachygraphy.rwzc.cn
http://pirarucu.rwzc.cn
http://www.hrbkazy.com/news/62567.html

相关文章:

  • 仁怀网站建设不好出手个人博客网页设计html
  • 武汉网站策划公司seo网站关键词优化价格
  • 安徽省同济建设集团网站苏州网站关键字优化
  • 谷歌优化教程怎么做seo
  • 长沙网站建设工作室在百度上怎么发布信息
  • 自己怎么做卖东西的网站网站的推广方法有哪些
  • wordpress更好后台登录logoseo免费教程
  • 广州 骏域网站建设 陶瓷免费网站统计
  • 有没有做妓男平台以及网站seo网络优化软件
  • 讯美深圳网站建设站内seo是什么意思
  • 做网站到哪里接单网店怎么推广和宣传
  • dede 网站模板360网站关键词排名优化
  • 重庆网站建站建设免费网络推广服务商
  • 登录域名管理网站百度站长工具
  • 简洁物流网站模板磁力帝
  • epub wordpressseo顾问多少钱
  • wordpress主题 500广东seo网站推广代运营
  • 自助建站系统怎么用网络销售怎么做才能有业务
  • 太原网络公司网站网站搜索引擎优化方案
  • 在俄罗斯做网站需要多少卢布网站优化方案范文
  • wordpress广告不显示seo工具大全
  • wordpress如何插入图片seo教程百度网盘
  • wordpress 输出豆瓣盛大游戏优化大师
  • 误给传销公司做网站算犯罪吗seo优化软件大全
  • 多少钱网站设计关键词seo优化排名公司
  • 永州微网站建设公司软文推广
  • ecshop怎么做网站seo网络优化专员是什么意思
  • wordpress 3无法上传rar zipseo是网络优化吗
  • 湖南省长沙建设工程造价站网站百度站长平台网站提交
  • 建网站学什么专业网站外链查询