QPT-Family / QPT

[内测中]QPT - 致力于让开源项目更好通往互联网世界的Python to EXE工具(Python打包)。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.0b4.dev1 Anaconda使用异常 TypeError: expected str, bytes or os.PathLike object, not NoneType

Hellcat1005 opened this issue · comments

QPT版本

1.0b4.dev1

操作系统版本

Windows 10

CPU型号

Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz

核心信息填写

采用“方式一撰写打包脚本”进行打包。

这是打包代码:
module = CEM(work_dir="D:/work/keya/projects/OCR/code/build", launcher_py_path="D:/work/keya/projects/OCR/code/build/interface_ocr.py", save_path="./out")

requirements:
altgraph==0.17.2
astor==0.8.1
attrdict==2.0.1
Babel==2.10.1
bce-python-sdk==0.8.73
cachetools==5.2.0
certifi @ file:///C:/Windows/TEMP/abs_e9b7158a-aa56-4a5b-87b6-c00d295b01fanefpc8_o/croots/recipe/certifi_1655968940823/work/certifi
cfgv==3.3.1
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.4
cssselect==1.1.0
cssutils==2.4.2
cycler==0.11.0
Cython==0.29.30
decorator==5.1.1
distlib==0.3.4
et-xmlfile==1.1.0
filelock==3.7.1
flake8==4.0.1
Flask==2.1.2
Flask-Babel==2.0.0
fonttools==4.33.3
future==0.18.2
identify==2.5.1
idna==3.3
imageio==2.19.3
imgaug==0.4.0
importlib-metadata==4.2.0
itsdangerous==2.1.2
Jinja2==3.1.2
kiwisolver==1.4.2
lmdb==1.3.0
lxml==4.9.0
MarkupSafe==2.1.1
matplotlib==3.5.2
mccabe==0.6.1
networkx==2.6.3
nodeenv==1.6.0
numpy==1.21.6
opencv-contrib-python==4.4.0.46
opencv-python==4.6.0.66
openpyxl==3.0.10
opt-einsum==3.3.0
packaging==21.3
paddle-bfloat==0.1.2
paddleocr==2.5.0.3
paddlepaddle==2.3.0
pandas==1.3.5
pefile==2022.5.30
Pillow==9.1.1
platformdirs==2.5.2
pre-commit==2.19.0
premailer==3.10.0
protobuf==3.19.0
pyclipper==1.3.0.post2
pycodestyle==2.8.0
pycryptodome==3.14.1
pyflakes==2.4.0
pyinstaller==5.1
pyinstaller-hooks-contrib==2022.7
pyparsing==3.0.9
python-dateutil==2.8.2
python-Levenshtein @ file:///C:/Users/wojia/Downloads/python_Levenshtein-0.12.2-cp37-cp37m-win_amd64.whl
pytz==2022.1
PyWavelets==1.3.0
pywin32-ctypes==0.2.0
PyYAML==6.0
QPT==1.0b4.dev1
requests==2.27.1
scikit-image==0.19.2
scipy==1.7.3
Shapely==1.8.2
shellcheck-py==0.8.0.4
six==1.16.0
tifffile==2021.11.2
toml==0.10.2
tqdm==4.64.0
typing_extensions==4.2.0
urllib3==1.26.9
virtualenv==20.14.1
visualdl==2.2.3
Werkzeug==2.1.2
wget==3.2
wincertstore==0.2
zipp==3.8.0

完整日志:
D:\Anaconda\envs\ocr\python.exe D:/work/keya/projects/OCR/code/build/build.py
→[2022-07-01 22:49:23,366] [DEBUG] | 操作系统类型:Windows
→[2022-07-01 22:49:23,367] [DEBUG] | 操作系统位数:AMD64
D:\Anaconda\envs\ocr\lib\site-packages_distutils_hack_init_.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
→[2022-07-01 22:49:23,969] [DEBUG] | SHELL: chcp 65001
→[2022-07-01 22:49:24,327] [DEBUG] | Windows PowerShell
→[2022-07-01 22:49:24,327] [DEBUG] | \u0228 (C) Microsoft Corporation\u0228
→[2022-07-01 22:49:24,327] [DEBUG] | \xb5\u013f\u01bd\u0328 PowerShell https://aka.ms/pscore6
→[2022-07-01 22:49:25,050] [DEBUG] | PS D:\work\keya\projects\OCR\code\build> chcp 65001 ; echo "---QPT OUTPUT STATUS CODE---" $?
→[2022-07-01 22:49:25,201] [DEBUG] | Active code page: 65001
→[2022-07-01 22:49:25,206] [DEBUG] | 终端命令执行成功!
→[2022-07-01 22:49:25,206] [DEBUG] | 正在连接PIPTerminal
→[2022-07-01 22:49:25,250] [DEBUG] | 已设置PIP跨版本编译模式,目标解释器路径为:./out\Release\Python\python.exe
→[2022-07-01 22:49:25,251] [INFO] | 当前解释器版本为3.7.13,正在向QPT查询是否存在合适的Python镜像...
→[2022-07-01 22:49:25,251] [INFO] | 已在QPT中找到Python3.7Env-Win镜像
→[2022-07-01 22:49:25,252] [INFO] | [Auto]正在分析D:\work\keya\projects\OCR\code\build下的依赖情况...
Ignoring invalid distribution -ip (d:\anaconda\envs\ocr\lib\site-packages)
Traceback (most recent call last):
File "D:/work/keya/projects/OCR/code/build/build.py", line 8, in
save_path="./out") # [输出目录]打包后相关文件的输出目录
File "D:\Anaconda\envs\ocr\lib\site-packages\qpt\executor.py", line 161, in init
deploy_mode=deploy_mode)
File "D:\Anaconda\envs\ocr\lib\site-packages\qpt\modules\auto_requirements.py", line 40, in init
action_mode=QPT_MEMORY.action_flag)
File "D:\Anaconda\envs\ocr\lib\site-packages\qpt\kernel\qinterpreter.py", line 241, in analyze_dependence
requires, dep, ignore_requires = intelligent_analysis(analyze_path, return_all_info=True)
File "D:\Anaconda\envs\ocr\lib\site-packages\qpt\kernel\qcode.py", line 67, in intelligent_analysis
install_dict, top_dict = search_packages_dist_info()
File "D:\Anaconda\envs\ocr\lib\site-packages\qpt\kernel\qpackage.py", line 139, in search_packages_dist_info
top_file_path = os.path.join(package_dist.info_location, "top_level.txt")
File "D:\Anaconda\envs\ocr\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Hi,开发者朋友,鉴于您是首次在QPT下新增Issue,请务必参考给定的Issue模板进行Issue的新增。
虽然形如版本号、打包日志等信息可能对你并不重要,但如未提供则可能会严重拖慢Issue的解决效率,因为他们对于QPT的维护者而言非常重要!
如您未按Issue模板进行内容补充,可关闭此Issue或Edit该Issue,社区维护者会对低效Issue直接Close,请悉知!

新版本1.0b4.dev2已经尝试修复,如后续仍有问题可以继续在issue中更新情况~https://github.com/QPT-Family/QPT/releases/tag/V1.0b4_2