python项目部署
Posted 橘子香气
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python项目部署相关的知识,希望对你有一定的参考价值。
https://xiulian.blog.csdn.net/article/details/88080765
https://cloud.tencent.com/developer/news/397399
https://www.cnblogs.com/shiyongge/p/10582552.html
https://blog.csdn.net/u012874140/article/details/101595503
pip失效
https://blog.csdn.net/xxzhangx/article/details/53558654
https://blog.csdn.net/weixin_39416561/article/details/83375409
pyinstaller XXX.spec成功日志:
D:\\pythonTest\\FaceRecognition\\FaceCode>pyinstaller flask_run.spec
152 INFO: PyInstaller: 4.0.dev0+a1f92c6a08
152 INFO: Python: 3.7.0 (conda)
153 INFO: Platform: Windows-10-10.0.18362-SP0
162 INFO: UPX is not available.
167 INFO: Extending PYTHONPATH with paths
[\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\',
\'D:\\\\pythonTest\\\\FaceRecognition\\\\FaceCode\']
167 INFO: checking Analysis
167 INFO: Building Analysis because Analysis-00.toc is non existent
167 INFO: Initializing module dependency graph...
174 INFO: Caching module graph hooks...
179 INFO: Analyzing base_library.zip ...
4268 INFO: Caching module dependency graph...
4372 INFO: running Analysis Analysis-00.toc
4389 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\python.exe
4732 INFO: Analyzing flask_run.py
5689 INFO: Processing pre-find module path hook distutils
5691 INFO: distutils: retargeting to non-venv dir \'C:\\\\Users\\\\lihong\\\\AppData\\\\Local\\\\Continuum\\\\anaconda3\\\\lib\'
11425 INFO: Processing pre-safe import module hook six.moves
15154 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
16247 INFO: Processing pre-find module path hook site
16249 INFO: site: retargeting to fake-dir \'C:\\\\Users\\\\lihong\\\\AppData\\\\Local\\\\Continuum\\\\anaconda3\\\\lib\\\\site-packages\\\\pyinstaller-4.0.dev0+a1f92c6a08-py3.7.egg\\\\PyInstaller\\\\fake-modules\'
26736 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_capture\\base_face_capture.py
26739 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_capture\\picture_face_capture.py
26741 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_capture\\video_face_capture.py
26742 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_cartoon\\convert_face_image.py
26742 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_recognize\\base_face_recognize.py
26744 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_recognize\\picture_face_recognize.py
26746 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\face_recognize\\video_face_recognize.py
26747 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\utility\\general_utility.py
26749 INFO: Analyzing D:\\pythonTest\\FaceRecognition\\FaceCode\\utility\\json_helper.py
26750 INFO: Processing module hooks...
26750 INFO: Loading module hook "hook-cryptography.py"...
27262 INFO: Loading module hook "hook-cv2.py"...
27263 INFO: Loading module hook "hook-distutils.py"...
27264 INFO: Loading module hook "hook-encodings.py"...
27373 INFO: Loading module hook "hook-jinja2.py"...
27386 INFO: Loading module hook "hook-lib2to3.py"...
27391 INFO: Loading module hook "hook-numpy.core.py"...
27506 INFO: MKL libraries found when importing numpy. Adding MKL to binaries
27515 INFO: Loading module hook "hook-numpy.py"...
27517 INFO: Loading module hook "hook-PIL.Image.py"...
28233 INFO: Loading module hook "hook-PIL.py"...
28235 INFO: Excluding import \'PyQt5\'
28236 INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt
28237 INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt
28237 INFO: Import to be excluded not found: \'FixTk\'
28237 INFO: Excluding import \'PyQt4\'
28239 INFO: Removing import of PyQt4 from module PIL.ImageQt
28239 INFO: Excluding import \'tkinter\'
28241 INFO: Removing import of tkinter from module PIL.ImageTk
28241 INFO: Excluding import \'PySide\'
28244 INFO: Removing import of PySide from module PIL.ImageQt
28244 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
28246 INFO: Excluding import \'tkinter\'
28248 INFO: Import to be excluded not found: \'FixTk\'
28248 INFO: Loading module hook "hook-pkg_resources.py"...
29452 INFO: Processing pre-safe import module hook win32com
29803 WARNING: Hidden import "pkg_resources.py2_warn" not found!
29804 INFO: Excluding import \'__main__\'
29806 INFO: Removing import of __main__ from module pkg_resources
29809 INFO: Loading module hook "hook-pycparser.py"...
29993 INFO: Loading module hook "hook-PyQt5.py"...
30537 WARNING: Hidden import "PyQt5.sip" not found!
30537 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
30659 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
30872 INFO: Loading module hook "hook-pytest.py"...
32244 INFO: Loading module hook "hook-pythoncom.py"...
33081 INFO: Loading module hook "hook-pywintypes.py"...
33941 INFO: Loading module hook "hook-scipy.py"...
33945 INFO: Loading module hook "hook-setuptools.py"...
35121 INFO: Loading module hook "hook-sysconfig.py"...
35123 INFO: Loading module hook "hook-win32com.py"...
36081 INFO: Loading module hook "hook-xml.dom.domreg.py"...
36082 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
36083 INFO: Loading module hook "hook-xml.py"...
36083 INFO: Loading module hook "hook-_tkinter.py"...
36365 INFO: checking Tree
36365 INFO: Building Tree because Tree-00.toc is non existent
36365 INFO: Building Tree Tree-00.toc
36493 INFO: checking Tree
36493 INFO: Building Tree because Tree-01.toc is non existent
36494 INFO: Building Tree Tree-01.toc
36562 INFO: checking Tree
36562 INFO: Building Tree because Tree-02.toc is non existent
36562 INFO: Building Tree Tree-02.toc
36581 INFO: checking Tree
36582 INFO: Building Tree because Tree-03.toc is non existent
36583 INFO: Building Tree Tree-03.toc
36589 INFO: checking Tree
36589 INFO: Building Tree because Tree-04.toc is non existent
36589 INFO: Building Tree Tree-04.toc
36592 INFO: checking Tree
36593 INFO: Building Tree because Tree-05.toc is non existent
36594 INFO: Building Tree Tree-05.toc
36598 INFO: Looking for ctypes DLLs
36666 INFO: Analyzing run-time hooks ...
36674 INFO: Including run-time hook \'pyi_rth_pkgres.py\'
36680 INFO: Including run-time hook \'pyi_rth_win32comgenpy.py\'
36683 INFO: Including run-time hook \'pyi_rth_multiprocessing.py\'
36710 INFO: Looking for dynamic libraries
36833 WARNING: lib not found: mpich2mpi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_mpich2_lp64.dll
36846 WARNING: lib not found: mpich2mpi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_mpich2_ilp64.dll
36860 WARNING: lib not found: impi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_intelmpi_lp64.dll
37623 WARNING: lib not found: msmpi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_msmpi_ilp64.dll
37737 WARNING: lib not found: impi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_intelmpi_ilp64.dll
37834 WARNING: lib not found: tbb.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_tbb_thread.dll
37868 WARNING: lib not found: msmpi.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_blacs_msmpi_lp64.dll
37909 WARNING: lib not found: pgf90.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_pgi_thread.dll
37915 WARNING: lib not found: pgc14.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_pgi_thread.dll
37921 WARNING: lib not found: pgf90rtl.dll dependency of C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\Library\\bin\\mkl_pgi_thread.dll
38952 INFO: Looking for eggs
38952 INFO: Using Python library C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\python37.dll
38953 INFO: Found binding redirects:
[]
38960 INFO: Warnings written to D:\\pythonTest\\FaceRecognition\\FaceCode\\build\\flask_run\\warn-flask_run.txt
39081 INFO: Graph cross-reference written to D:\\pythonTest\\FaceRecognition\\FaceCode\\build\\flask_run\\xref-flask_run.html
39110 INFO: Appending \'datas\' from .spec
39119 INFO: checking PYZ
39120 INFO: Building PYZ because PYZ-00.toc is non existent
39120 INFO: Building PYZ (ZlibArchive) D:\\pythonTest\\FaceRecognition\\FaceCode\\build\\flask_run\\PYZ-00.pyz
42108 INFO: Building PYZ (ZlibArchive) D:\\pythonTest\\FaceRecognition\\FaceCode\\build\\flask_run\\PYZ-00.pyz completed successfully.
42135 INFO: checking PKG
42135 INFO: Building PKG because PKG-00.toc is non existent
42135 INFO: Building PKG (CArchive) PKG-00.pkg
42171 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
42173 INFO: Bootloader C:\\Users\\lihong\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\pyinstaller-4.0.dev0+a1f92c6a08-py3.7.egg\\PyInstaller\\bootloader\\Windows-64bit\\run.exe
42173 INFO: checking EXE
42173 INFO: Building EXE because EXE-00.toc is non existent
42174 INFO: Building EXE from EXE-00.toc
42175 INFO: Appending archive to EXE D:\\pythonTest\\FaceRecognition\\FaceCode\\build\\flask_run\\flask_run.exe
42182 INFO: Building EXE from EXE-00.toc completed successfully.
42185 INFO: checking COLLECT
42186 INFO: Building COLLECT because COLLECT-00.toc is non existent
42188 INFO: Building COLLECT COLLECT-00.toc
46227 INFO: Building COLLECT COLLECT-00.toc completed successfully.
以上是关于python项目部署的主要内容,如果未能解决你的问题,请参考以下文章