程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

How can scripts written in python3.9 be executed in all centos7 environments

編輯:Python

use python3.9 Written Linux Scripts used on , Operating systems are basically centos7, Inside python The environment is python2.7, You need to manually install one on each machine where you want to use scripts python3.9, And manually install the relevant libraries , Is there any way I can put python3.9 The environment and the application library are put together , copy to Linux You can use it directly . Just beginning to learn python Scripts handle server problems , Please give me some advice , Thank you very much .




Take the answer :

try pyinstaller pack

pyinstaller General description of the packaging process (linux)_bingfeiqiji The blog of -CSDN Blog _pyinstaller pack linux One 、 Configured in the file .spec,build.sh , start.sh, stop.sh After the document , The later packaging process is very simple ,(1) among .spec File is a packaging process , And pyinstaller of ( Need further study ), It can define the modules to be extracted , Packed file name and other related information .(2)build.sh It is you who execute the packaging command , Include pyinstaller ***.spec Or if not .spec When you file , Use pyinstaller -F ***.py command , Can be defined in build.sh In the folder , It also includes the execution of https://blog.csdn.net/bingfeiqiji/article/details/108405220



  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved