python - ValueError:使用pyinstaller编辑.spec文件时找不到脚本'filename.py'
问题描述
所以我试图更改我命名为“filename.py”的.spec文件中的某些内容,尽管即使我从包含该文件的文件夹中打开命令提示符,pyinstaller也永远找不到该文件。我什至尝试插入整个文件路径,但仍然收到相同的错误。
PS C:\Users\S3401\Desktop\New folder> pyi-makespec filename.py
wrote C:\Users\S3401\Desktop\New folder\filename.spec
now run pyinstaller.py to build the executable
PS C:\Users\S3401\Desktop\New folder> pyinstaller .\filename.spec
46 INFO: PyInstaller: 3.3.1
46 INFO: Python: 3.6.6
46 INFO: Platform: Windows-10-10.0.17134-SP0
47 INFO: UPX is not available.
Traceback (most recent call last):
File "C:\Program Files\Python36\Scripts\pyinstaller-script.py", line 11, in <module>
load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
File "c:\program files\python36\lib\site-packages\PyInstaller\__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\program files\python36\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\program files\python36\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\program files\python36\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "c:\program files\python36\lib\site-packages\PyInstaller\building\build_main.py", line 162, in __init__
raise ValueError("script '%s' not found" % script)
ValueError: script 'filename.py' not found
解决方案
推荐阅读
- javascript - 进行新查询时如何清除以前的api结果
- laravel-7 - 试图获取非对象的属性“Product_image”(查看:F:\softwares\xampp\htdocs\MyProject\resources\views\home.blade.php)
- azure - 是否可以在没有任何登录信息的情况下使用 azureml?
- oracle-apex - Oracle APEX 将值设置为 Ajax 进程中的页面项
- wso2 - 为租户创建轴配置时出现 WSO2 APIUtil 错误
- python - 调用函数一定次数
- python - 在 python 中编辑 json 文件和请求库时出现问题
- kubernetes - 请参阅 Kubernetes 中的 Spec 模板变量以获取主机路径
- javascript - 如何从 From 外部更改 Formik TextField 值?
- sql - 在执行 SQL 插入语句时避免重复代码部分,该语句从一个表中获取数据,修改它,然后插入到另一个表中?