ubuntu下pyinstaller打包.py为ubuntu软件,在命令下运行报错,该怎么解决?

运行程序命令为下面第1行:

janlee@janlee-Lenovo-Product:~/mycode/myseaice_test/dist$ ./myseaice_main_test

报错内容为(我的打包的主程序myseaice_main_test.py):

Traceback (most recent call last):

File "myseaice_main_test.py", line 10, in

File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module

exec(bytecode, module.__dict__)

File "dist-packages/skimage/io/__init__.py", line 76, in

File "dist-packages/skimage/io/__init__.py", line 56, in _update_doc

ValueError: max() arg is an empty sequence

Failed to execute script myseaice_main_test

1个回答

max函数的参数为空,看下是不是某个配置为空或者参数为空

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
pyinstaller打包.py文件出错,求解
pyinstaller打包.py文件出错,求解 ``` Traceback (most recent call last): File "c:\users\86134\appdata\local\programs\python\python38-32\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\86134\appdata\local\programs\python\python38-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\86134\AppData\Local\Programs\Python\Python38-32\Scripts\pyinstaller.exe\__main__.py", line 7, in <module> File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build exec(code, spec_namespace) File "C:\Users\86134\Desktop\qw.spec", line 18, in <module> pyz = PYZ(a.pure, a.zipped_data, File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__ self.__postinit__() File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__ self.assemble() File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble self.code_dict = { File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp> key: strip_paths_in_code(code) File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code consts = tuple( File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr> strip_paths_in_code(const_co, new_filename) File "c:\users\86134\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize, TypeError: an integer is required (got type bytes) ```
python 使用pyinstaller 将.py转成.exe的一些问题
环境:python37+win10+pyinstaller3.1.1 生成.exe文件后,在build文件夹中产生了一个warn.txr的文件: 如图: ![图片说明](https://img-ask.csdn.net/upload/201806/05/1528176467_376155.png) 显示missing module name .... 我程序引用的模块都在python文件夹下边,而不在项目文件夹下,如图: ![图片说明](https://img-ask.csdn.net/upload/201806/05/1528176593_396836.png) 请问应该怎么操作,才能把warn.txt文件内的模块引用到?
为什么在pyinstaller打包运行正常的.py文件为exe文件后,exe文件运行报错?
环境: win7, 32位,Python2.7, pywinauto 问题: 使用Pyinstaller打包.py文件为exe文件,exe文件运行报错:SendInput() inserted only 0 out of 2 keyboard events. 但是.py文件运行正常。 代码: exe文件报错的代码在date.TypeKeys(timestr_1)这里报错,附上部分代码: #调用加密程序encrypt.exe加密已导出的库文件 file_encrypt_0 = r'\加密(IPS&&IDS)\EncryptDB.exe' file_encrypt_1 = PathStr + unicode(file_encrypt_0, 'utf8') app_encrypt = Application().start(file_encrypt_1) dlg_encrypt = app_encrypt.window_(class_name="#32770") date = dlg_encrypt.window_(title_re='201', class_name="SysDateTimePick32") date.TypeKeys(timestr_1)
求助:pyinstaller3.5 打包 WARNING: Cannot read QLibraryInfo..... json.decoder.JSONDecodeError..
求助,python新手,installer打包问题... --- 我是直接安装Anaconda pyinstaller是下载的包,然后直接python setup.py install --- 版本信息: PyQt:PyQt5-5.12.1 Python:Python 3.5.2 :: Anaconda 4.2.0 (64-bit) pyinstaller:3.5.dev0+14b6e6564 --- 下面是报错 ----- ```` C:\CodeNew\pythonEx\excel>pyinstaller -F UnitClassification.py 573 INFO: PyInstaller: 3.5.dev0+14b6e6564 573 INFO: Python: 3.5.2 575 INFO: Platform: Windows-10-10.0.17134-SP0 583 INFO: wrote C:\CodeNew\pythonEx\excel\UnitClassification.spec 588 INFO: UPX is not available. 590 INFO: Extending PYTHONPATH with paths ['C:\\CodeNew\\pythonEx\\excel', 'C:\\CodeNew\\pythonEx\\excel'] 591 INFO: checking Analysis 910 INFO: Building because C:\Users\wen\Anaconda3\lib\site-packages\PyQt5\__init__.py changed 911 INFO: Initializing module dependency graph... 918 INFO: Initializing module graph hooks... 928 INFO: Analyzing base_library.zip ... 8230 INFO: running Analysis Analysis-00.toc 9060 INFO: Caching module hooks... 9066 INFO: Analyzing C:\CodeNew\pythonEx\excel\UnitClassification.py 9247 INFO: Processing pre-find module path hook distutils 9823 INFO: Processing pre-safe import module hook six.moves 18032 INFO: Processing pre-safe import module hook setuptools.extern.six.moves 18932 INFO: Processing pre-find module path hook site 18938 INFO: site: retargeting to fake-dir 'c:\\users\\wen\\anaconda3\\lib\\site-packages\\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\\PyInstaller\\fake-modules' 18982 INFO: Processing pre-safe import module hook win32com 102468 INFO: Loading module hooks... 102469 INFO: Loading module hook "hook-PyQt5.py"... 102560 WARNING: Cannot read QLibraryInfo output: raised Expecting value: line 1 column 1 (char 0) when decoding: Traceback (most recent call last): File "<string>", line 11, in <module> ImportError: DLL load failed: 找不到指定的模块。 Traceback (most recent call last): File "C:\Users\wen\Anaconda3\Scripts\pyinstaller-script.py", line 11, in <module> load_entry_point('PyInstaller==3.5.dev0+14b6e6564', 'console_scripts', 'pyinstaller')() File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 844, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 791, in build exec(code, spec_namespace) File "C:\CodeNew\pythonEx\excel\UnitClassification.spec", line 17, in <module> noarchive=False) File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 243, in __init__ self.__postinit__() File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\datastruct.py", line 158, in __postinit__ self.assemble() File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\build_main.py", line 502, in assemble module_hook.post_graph() File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\imphook.py", line 410, in post_graph self._load_hook_module() File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\building\imphook.py", line 377, in _load_hook_module self.hook_module_name, self.hook_filename) File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\compat.py", line 785, in importlib_load_source return mod_loader.load_module() File "<frozen importlib._bootstrap_external>", line 388, in _check_name_wrapper File "<frozen importlib._bootstrap_external>", line 809, in load_module File "<frozen importlib._bootstrap_external>", line 668, in load_module File "<frozen importlib._bootstrap>", line 268, in _load_module_shim File "<frozen importlib._bootstrap>", line 693, in _load File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 665, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\hooks\hook-PyQt5.py", line 23, in <module> collect_system_data_files(pyqt5_library_info.location['PrefixPath'], File "c:\users\wen\anaconda3\lib\site-packages\pyinstaller-3.5.dev0+14b6e6564-py3.5.egg\PyInstaller\utils\hooks\qt.py", line 70, in __getattr__ qli = json.loads(json_str) File "C:\Users\wen\Anaconda3\lib\json\__init__.py", line 319, in loads return _default_decoder.decode(s) File "C:\Users\wen\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\wen\Anaconda3\lib\json\decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ```
.py用pyinstaller打包生成的exe,在cmd里面运行没有print输出
在命令行里运行脚本,然后带参数,用python.exe -test.py -c ** -f ** or python.exe -test.py -h,这样能在cmd里面有print输出。但是用pyinstaller打包生成.exe后(pyinstaller -w -F test.py common.py),命令行能正常执行,但是没有print输出,求解 ```test.py里的 import sys import common if len(sys.argv) == 1: valueforc = "None" valueforf = "None" print (valueforc,valueforf) else: (optc, valueforc, optf, valueforf) = common.command(sys.argv[1:]) print ("test1") ``` ```common.py里的 def command(argv): try: opts, args = getopt.getopt(argv, "hc:f:") print(opts, args) except getopt.GetoptError: print('use the current options: test.py -c <categoryname> -f <featurename>') sys.exit(2) for opt, arg in opts: if opt == '-h': print('test.py -c <categoryname> -f <featurename>') sys.exit() elif opt == "-c": category = arg optc = opt optf = "None" feature = "None" elif opt == "-f": feature = arg optf = opt optc = "None" category = "None" return(optc, category, optf, feature) ```
linux 系统下python pyinstaller -F .py后生成单一可执行dist文件,在别的linux电脑运行发生报错
报错信息: Traceback (most recent call last): File "just.py", line 10, in <module> File "/usr/local/lib/python2.7/dist-packages/PyInstaller-3.4-py2.7.egg/PyInstaller/loader/pyimod03_importers.py", line 684, in load_module ImportError: /lib/x86_64-linux-gnu/ibc.so.6l: version `GLIBC_2.25' not found (required by /tmp/_MEIXyxj20/libexpat.so.1) [14385] Failed to execute script just 报错信息可知生成的可执行文件试图寻找pyimod03_importers.py文件,但所寻路径为原电脑路径,/libc.so.6也为原文件路径,故不能找到GLIBC_2.25 但pyinstaller -F .py所生成的单一执行文件不是不依赖环境和数据库吗 .................................................... 已尝试更新GLIBC_2.25,但仍从报错路径下查找
pyinstaller打包py成exe后音乐文件播放异常,pygame.error
已解决 虽然不知道什么原因 用pyinstaller打包以后pygame不支持播放mp3和ogg文件 我把音乐文件转换成wav格式就成功了 所以mp3和ogg在pycharm里可以正常使用,不过如果要转成exe的话还得先把音乐文件统一转化成wav才行 问题描述: ``` if self.direct == 1: pygame.init() music = r"music\ai.mp3" pygame.mixer.music.load(music) pygame.mixer.music.play() ``` 一个十分普通的语句,在pycharm里可以顺利运行,但使用pyinstaller完成打包,并把music文件夹复制到和exe文件同目录下后却不能正常播放music里面的音乐文件,出现如下报错:![图片说明](https://img-ask.csdn.net/upload/202001/11/1578673075_740305.png) 整条路径没有中文名,歌曲文件名为ai.mp3,也没有中文名; 打包语句:pyinstaller -D loadui_new.py 目前已经试过网上的冻结路径法、spec打包(使用--add-data添加文件)法,报错没有变化。 初学python,还请各位前辈能教一下,感激不尽
用pyinstaller打包程序时(程序中有在cmd调用exe的行为)添加-w,界面卡住没反应?
1. 主程序用含有命令行调用exe的代码,pyinstaller打包。打包命令添加-w时发现运行程序时界面会卡住不动,不添加就可以正常运行,很不解。 调用exe代码如下: D:\\Converter\\kernel_time_convert.exe D:\\Log\\mobilelog\\APLog_2019_0621_164712__8\\kernel_log_6__2019_0621_173139 意思是用这个exe工具来转换kernellog的时间格式 2. 打包命令为pyinstaller test.py -F -w 3. 为啥不加-w就可以正常运行了?
Python: 使用pyinstaller打包exe时报错Cannot find PyQt5 plugin directories
Python: 使用pyinstaller打包exe时报错Cannot find PyQt5 plugin directories 环境win7,python3.6,pyinstaller3.3,在用pyinstaller打包的时候会报错。
PyInstaller 如何打包多个py文件成exe文件???
求高手帮助: 我想利用pyInstaller或者任何Python打包工具,把多个py文件打包成exe文件;这些py文件中,有一个是mymain.py;它会调用其他的如a.py,b.py;同时这些py 文件会调用一些第三方库,如numpy之类的。我想把他们打包成一个exe,请教如何做? 我的pyInstaller是最小版本,2.1 Python是2.7
pyinstaller打包exe后在其他环境上无法运行
win10 64位上用pyinstaller把.py打包.exe,本机上没有问题,但在win xp上无法运行 试着搜索了一下warn文件里的内容貌似没找到解决方案 打包过程的图片: ![图片说明](https://img-ask.csdn.net/upload/201901/30/1548828748_686025.png) warn里面的内容: ```py missing module named resource - imported by posix, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named posix - imported by os, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named _posixsubprocess - imported by subprocess, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named org - imported by pickle, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named readline - imported by cmd, code, pdb, C:\Users\12848\Desktop\project\I GOT YOU.py excluded module named _frozen_importlib - imported by importlib, importlib.abc, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named _winreg - imported by platform, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named _scproxy - imported by urllib.request missing module named java - imported by platform, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named 'java.lang' - imported by platform, C:\Users\12848\Desktop\project\I GOT YOU.py, xml.sax._exceptions missing module named vms_lib - imported by platform, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named termios - imported by tty, C:\Users\12848\Desktop\project\I GOT YOU.py, getpass missing module named grp - imported by shutil, tarfile, C:\Users\12848\Desktop\project\I GOT YOU.py missing module named 'org.python' - imported by copy, C:\Users\12848\Desktop\project\I GOT YOU.py, xml.sax missing module named pwd - imported by posixpath, shutil, tarfile, http.server, webbrowser, C:\Users\12848\Desktop\project\I GOT YOU.py, netrc, getpass missing module named _dummy_threading - imported by dummy_threading, C:\Users\12848\Desktop\project\I GOT YOU.py ``` 我的程序中调用的库: ```python from tkinter import* import tkinter.messagebox from random import randint from threading import Thread from time import sleep from re import split ```
pyinstaller打包后os.system("shutdown -s")命令失效,在pycharm中运行就没问题
如下是代码,就是测试一下shutdown命令,在pycharm直接运行代码就没有问题 用pyinstaller打包后就不得行了 ``` import os,time os.system("shutdown -s -c 'nihao' -t 60") time.sleep(10) os.system("shutdown -a") input() ``` 而且打包运行ipconfig命令都可以,就是shutdown相关命令就没反应 求大佬解答 我是刚学python不久的小白 系统是win10,用的pycharm,python3.7.4 发现在别的电脑上同样打包就可以,自己在虚拟机完全模拟物理机安装的版本打包也可以,就是自己物理机上写的py文件再打包就不得行,打包别人写好的py文件运行都没问题,见鬼了 而且把我电脑上写好的py文件,拿到别人电脑上打包也不得行,就那么几行代码,好像文件有毒一样
pyinstaller 打包python文件为exe时出错
cmd上运行后如下: C:\WINDOWS\system32>pyinstaller -F C:\Users\lenovo\Desktop\文档\测试\btboay.py 128 INFO: PyInstaller: 3.3.1 128 INFO: Python: 3.6.5 129 INFO: Platform: Windows-10-10.0.16299-SP0 131 INFO: wrote C:\WINDOWS\system32\btboay.spec 141 INFO: UPX is not available. 142 INFO: Extending PYTHONPATH with paths ['C:\\Users\\lenovo\\Desktop\\文档\\测试', 'C:\\WINDOWS\\system32'] 143 INFO: checking Analysis 270 INFO: Building because inputs changed 271 INFO: Initializing module dependency graph... 294 INFO: Initializing module graph hooks... 299 INFO: Analyzing base_library.zip ... 7202 INFO: running Analysis out00-Analysis.toc 7208 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by d:\python\python.exe 7701 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of d:\python\python36.dll 7782 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\python36.dll 8887 INFO: Caching module hooks... 8900 INFO: Analyzing C:\Users\lenovo\Desktop\文档\测试\btboay.py 9554 INFO: Loading module hooks... 9555 INFO: Loading module hook "hook-encodings.py"... 10430 INFO: Loading module hook "hook-pydoc.py"... 10432 INFO: Loading module hook "hook-xml.py"... 10926 INFO: Loading module hook "hook-_tkinter.py"... 11707 INFO: checking Tree 11981 INFO: checking Tree 12067 INFO: Looking for ctypes DLLs 12067 INFO: Analyzing run-time hooks ... 12072 INFO: Including run-time hook 'pyi_rth__tkinter.py' 12094 INFO: Looking for dynamic libraries 12195 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs\_ssl.pyd 12327 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs\_hashlib.pyd 12828 INFO: Looking for eggs 12828 INFO: Using Python library d:\python\python36.dll 12829 INFO: Found binding redirects: [] 12849 INFO: Warnings written to C:\WINDOWS\system32\build\btboay\warnbtboay.txt 12952 INFO: Graph cross-reference written to C:\WINDOWS\system32\build\btboay\xref-btboay.html 13010 INFO: checking PYZ 13036 INFO: Building because toc changed 13036 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz 14218 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz completed successfully. 14232 INFO: checking PKG 14291 INFO: Building because toc changed 14291 INFO: Building PKG (CArchive) out00-PKG.pkg 20903 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully. 20975 INFO: Bootloader d:\python\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe 20975 INFO: checking EXE 21034 INFO: Building because toc changed 21034 INFO: Building EXE from out00-EXE.toc 21219 INFO: Appending archive to EXE C:\WINDOWS\system32\dist\btboay.exe 21236 INFO: Building EXE from out00-EXE.toc completed successfully. 但我要打包的文件目录下只生成了一个__pycache__文件夹,没有打包的EXE文件
pyinstaller打包py文件为exe的报错
__打包为exe后,运行出现报错 Exception in Tkinter callback Traceback (most recent call last): ___ File "Tkinter.pyc", line 1532, in __call____ File "zhaopin.py", line 153, in reg File "zhaopin.py", line 39, in GetPath File "zhaopin.py", line 44, in GetIfo File "bs4\__init__.pyc", line 152, in __init__ FeatureNotFound: Couldn't find a tree builder with the features you requested: l xml. Do you need to install a parser library? 但是我在pycharm中运行正常,且lxml已经安装了,这是为什么呢
pyinstaller打包问题 求大佬们解答
![图片说明](https://img-ask.csdn.net/upload/201909/18/1568794788_809748.png) 大佬们怎么用pyinstaller打包这个项目啊 main方法在thunder.py里面 GBFUtils里有写__import__('GBFUtils')
python pyinstaller打包exe遇到Tk的GUI问题
求问pyinstaller 打包时有tk的GUI打包完不运行怎么办? py脚本运行正常,打包后运行不报错也不弹框,一闪而过。 扔进cmd里直接运行,什么都没发生。。。。。 依赖路径都写了,-F -w -p,然并卵,还是在build里有一些import的错误。 py3.6,pyinstaller3.3 看网上说什么-K -tk参数可以支持tk,但是翻官方文档根本没这个参数。
python3.8用pyinstaller3.5导不出exe提示TypeError: an integer is required (got type bytes)
我开始以为是我代码出问题, 后来发先即使我的代码是 print ("Hello World!") 都会出现相同的问题 import requests url="https://ar.**d.cn/users/20000" headers = {"Authorization": "Basic NDM1NzY1OTU6ckgyNzdadXpaZi96VUh4b1g3bVZNQkpNMmtUZm5XUjF2ZEdwNWhlVDlDRVlzMjMvV2VBeUJaQWtyR0h2NHcvb1FTTFJjeWNxc1h******UlsS0ZpVEh5TVM5WW96cjR1SURoNkhqSFhLRkNvUWMyZ0kyNUNZTzRXYnM5aUFKRklEMjJXM3lGOE5MeklTYnF0b2g2SXB5QWo0b2FvOUR6KzRHYTlwRGNjamw2S2k3Umw2SUdKZi9Od2ZXSkFsRmJOUnliRzh3T0tZNFEySGpkbHFTSnIxc0pZa0h3TEY4enE4OEt1U3V4TzJzU29j"} r = requests.get(url, headers=headers) print (r.json()) 上面是我之前的代码,测试运行都是没问题的,但是打包exe就出错了 ![图片说明](https://img-ask.csdn.net/upload/201911/07/1573062806_777820.jpg)
Python: 使用pyinstaller打包exe时报错JSONDecodeError: Expecting value: line 1 column 1 (char 0)
环境win7,python3.6,pyinstaller3.5 and 3.4,在用pyinstaller打包的时候会报错。 **_raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)**_
pyinstaller如何打包含有dll的.py文件?
命令:pyinstaller test.spec 执行:test.exe 出错:E:\python\project\lbmWebS\lib\testapi.dll could not be extracted! 打包的warn文件 missing module named unicodedata.ucd_3_2_0 - imported by unicodedata, stringprep, encodings.idna missing module named _warnings.warn_explicit - imported by _warnings, warnings missing module named _warnings.filters - imported by _warnings, warnings missing module named _warnings.once_registry - imported by _warnings, warnings missing module named _warnings.default_action - imported by _warnings, warnings missing module named _warnings.warn - imported by _warnings, warnings missing module named _subprocess.STD_OUTPUT_HANDLE - imported by _subprocess, subprocess missing module named _subprocess.CREATE_NEW_PROCESS_GROUP - imported by _subprocess, subprocess missing module named _subprocess.STD_INPUT_HANDLE - imported by _subprocess, subprocess missing module named _subprocess.STARTF_USESHOWWINDOW - imported by _subprocess, subprocess missing module named _subprocess.CREATE_NEW_CONSOLE - imported by _subprocess, subprocess missing module named _subprocess.STD_ERROR_HANDLE - imported by _subprocess, subprocess missing module named _subprocess.STARTF_USESTDHANDLES - imported by _subprocess, subprocess missing module named _subprocess.SW_HIDE - imported by _subprocess, subprocess missing module named cPickle.loads - imported by cPickle, collections missing module named cPickle.dumps - imported by cPickle, collections missing module named thread.get_ident - imported by thread, collections missing module named thread._local - imported by thread, threading missing module named thread.stack_size - imported by thread, threading missing module named thread.allocate_lock - imported by thread, _strptime missing module named itertools.chain - imported by itertools, heapq, collections missing module named itertools.starmap - imported by itertools, collections missing module named itertools.repeat - imported by itertools, heapq, collections missing module named itertools.imap - imported by itertools, heapq missing module named itertools.tee - imported by itertools, heapq missing module named itertools.izip - imported by itertools, heapq missing module named itertools.count - imported by itertools, heapq missing module named itertools.islice - imported by itertools, repr, heapq missing module named operator.itemgetter - imported by operator, collections, heapq missing module named operator.attrgetter - imported by operator, inspect missing module named _collections.deque - imported by _collections, collections missing module named _collections.defaultdict - imported by _collections, collections missing module named _weakref.ref - imported by _weakref, _weakrefset, weakref missing module named _weakref.ReferenceType - imported by _weakref, weakref missing module named _weakref.proxy - imported by _weakref, weakref missing module named _weakref.getweakrefs - imported by _weakref, weakref missing module named _weakref.getweakrefcount - imported by _weakref, weakref missing module named _weakref.ProxyType - imported by _weakref, weakref missing module named _weakref.CallableProxyType - imported by _weakref, weakref missing module named time.time - imported by time, threading missing module named time.sleep - imported by time, threading missing module named datetime.date - imported by datetime, _strptime missing module named errno.ENOENT - imported by errno, gettext missing module named _functools.partial - imported by _functools, functools missing module named _functools.reduce - imported by _functools, functools missing module named copy.deepcopy - imported by copy, weakref missing module named exceptions.ReferenceError - imported by exceptions, weakref missing module named binascii.hexlify - imported by binascii, random missing module named math.sin - imported by math, random missing module named math.sqrt - imported by math, random missing module named math.cos - imported by math, random missing module named math.acos - imported by math, random missing module named math.ceil - imported by math, random missing module named math.exp - imported by math, random missing module named math.log - imported by math, random missing module named math.e - imported by math, random missing module named math.pi - imported by math, random missing module named readline - imported by cmd, pdb missing module named errno.EINVAL - imported by errno, StringIO missing module named cStringIO.StringIO - imported by cStringIO, gettext, pickle, pprint, shlex, tempfile, encodings.uu_codec, quopri, encodings.quopri_codec missing module named binascii.b2a_qp - imported by binascii, quopri missing module named binascii.a2b_qp - imported by binascii, quopri missing module named binascii.a2b_uu - imported by binascii, encodings.uu_codec missing module named binascii.b2a_uu - imported by binascii, encodings.uu_codec missing module named 'org.python'.PyStringMap - imported by 'org.python', pickle missing module named 'org.python' - imported by pickle missing module named struct.calcsize - imported by struct, ctypes missing module named _struct.__doc__ - imported by _struct, struct missing module named _struct._clearcache - imported by _struct, struct missing module named fcntl - imported by subprocess, tempfile missing module named threading.RLock - imported by threading, _threading_local missing module named threading.current_thread - imported by threading, _threading_local missing module named os.urandom - imported by os, random missing module named riscosenviron._Environ - imported by riscosenviron, os missing module named riscosenviron - imported by os missing module named riscospath - imported by os missing module named riscos._exit - imported by riscos, os missing module named riscos - imported by os missing module named ce._exit - imported by ce, os missing module named ce - imported by os missing module named _emx_link.link - imported by _emx_link, os missing module named _emx_link - imported by os missing module named os2._exit - imported by os2, os missing module named os2 - imported by os missing module named nt._isdir - imported by nt, ntpath missing module named nt._getfullpathname - imported by nt, ntpath missing module named nt._exit - imported by nt, os missing module named pwd - imported by posixpath missing module named posix._exit - imported by posix, os missing module named posix - imported by os missing module named resource - imported by posix missing module named strop.whitespace - imported by strop, string missing module named strop.maketrans - imported by strop, string missing module named strop.lowercase - imported by strop, string missing module named strop.uppercase - imported by strop, string missing module named org.PyStringMap - imported by org, copy missing module named org - imported by copy missing module named re._compile - imported by re, sre missing module named re.__all__ - imported by re, sre missing module named codecs.mbcs_encode - imported by codecs, encodings.mbcs missing module named codecs.mbcs_decode - imported by codecs, encodings.mbcs missing module named _ctypes._wstring_at_addr - imported by _ctypes, ctypes missing module named _ctypes._string_at_addr - imported by _ctypes, ctypes missing module named _ctypes._cast_addr - imported by _ctypes, ctypes missing module named _ctypes._memset_addr - imported by _ctypes, ctypes missing module named _ctypes._memmove_addr - imported by _ctypes, ctypes missing module named _ctypes.get_last_error - imported by _ctypes, ctypes missing module named _ctypes.set_last_error - imported by _ctypes, ctypes missing module named _ctypes._check_HRESULT - imported by _ctypes, ctypes missing module named _ctypes.set_conversion_mode - imported by _ctypes, ctypes missing module named _ctypes._pointer_type_cache - imported by _ctypes, ctypes missing module named _ctypes.POINTER - imported by _ctypes, ctypes missing module named _ctypes._SimpleCData - imported by _ctypes, ctypes missing module named _ctypes.get_errno - imported by _ctypes, ctypes missing module named _ctypes.set_errno - imported by _ctypes, ctypes missing module named _ctypes.alignment - imported by _ctypes, ctypes missing module named _ctypes.addressof - imported by _ctypes, ctypes missing module named _ctypes.resize - imported by _ctypes, ctypes missing module named _ctypes.byref - imported by _ctypes, ctypes missing module named _ctypes.sizeof - imported by _ctypes, ctypes missing module named _ctypes.dlopen - imported by _ctypes, ctypes missing module named _ctypes.FUNCFLAG_STDCALL - imported by _ctypes, ctypes missing module named _ctypes.LoadLibrary - imported by _ctypes, ctypes missing module named _ctypes.FUNCFLAG_USE_ERRNO - imported by _ctypes, ctypes missing module named _ctypes.FUNCFLAG_USE_LASTERROR - imported by _ctypes, ctypes missing module named _ctypes.FUNCFLAG_PYTHONAPI - imported by _ctypes, ctypes missing module named _ctypes.FUNCFLAG_CDECL - imported by _ctypes, ctypes missing module named _ctypes.FormatError - imported by _ctypes, ctypes missing module named _ctypes.ArgumentError - imported by _ctypes, ctypes missing module named _ctypes.RTLD_LOCAL - imported by _ctypes, ctypes missing module named _ctypes.RTLD_GLOBAL - imported by _ctypes, ctypes missing module named _ctypes.__version__ - imported by _ctypes, ctypes missing module named _ctypes.CFuncPtr - imported by _ctypes, ctypes missing module named _ctypes._Pointer - imported by _ctypes, ctypes missing module named _ctypes.Structure - imported by _ctypes, ctypes missing module named _ctypes.Array - imported by _ctypes, ctypes missing module named _ctypes.Union - imported by _ctypes, ctypes
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
相关热词 c# clr dll c# 如何orm c# 固定大小的字符数组 c#框架设计 c# 删除数据库 c# 中文文字 图片转 c# 成员属性 接口 c#如何将程序封装 16进制负数转换 c# c#练手项目
立即提问