Win11+Conda/Python3.8下Briefcase执行dev命令报配置文件未找到错误
Briefcase dev命令找不到pyproject.toml的排查方案
环境信息
- 系统:Win11
- Python版本:3.8(Conda管理)
- Briefcase版本:0.3.16
问题描述
通过briefcase new默认配置创建项目后,执行briefcase dev时出现错误:
Briefcase configuration error: Configuration file not found. Did you run Briefcase in a project directory that contains 'pyproject.toml'?
已尝试相关社区方案但未解决,以下是当前pip依赖列表:
absl-py 1.4.0 aes 1.2.0 alabaster 0.7.13 anyio 4.0.0 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asgiref 3.5.2 asttokens 2.0.5 astunparse 1.6.3 async-lru 2.0.4 atomicwrites 1.4.1 attrs 23.1.0 Babel 2.12.1 backcall 0.2.0 beautifulsoup4 4.12.2 binaryornot 0.4.4 black 23.9.1 bleach 6.0.0 Bottleneck 1.3.5 briefcase 0.3.16 Brotli 1.0.9 brotlipy 0.7.0 build 1.0.3 cachetools 5.3.1 certifi 2022.12.7 cffi 1.15.1 chardet 3.0.4 charset-normalizer 2.1.1 click 8.1.7 cloudpickle 2.0.0 clr-loader 0.2.6 colorama 0.4.6 comm 0.1.4 contourpy 1.0.5 cookiecutter 2.4.0 cryptography 38.0.4 curio 1.6 cycler 0.11.0 debugpy 1.5.1 decorator 5.1.1 defusedxml 0.7.1 docrepr 0.2.0 docutils 0.18.1 EasyProcess 1.1 entrypoint2 1.1 entrypoints 0.4 et-xmlfile 1.1.0 exceptiongroup 1.1.3 executing 0.8.3 fastjsonschema 2.18.0 filelock 3.9.0 Flask 2.2.5 flatbuffers 23.5.26 flit_core 3.6.0 fonttools 4.25.0 fqdn 1.5.1 freegames 2.5.3 gast 0.4.0 gitdb 4.0.11 GitPython 3.1.40 google-auth 1.4.2 google-auth-oauthlib 1.0.0 google-pasta 0.2.0 grpcio 1.57.0 h11 0.14.0 h2 4.1.0 h5py 3.9.0 hpack 4.0.0 hyperframe 6.0.1 idna 2.8 imageio 2.31.5 imagesize 1.4.1 importlib-metadata 6.8.0 importlib-resources 5.2.0 iniconfig 2.0.0 ipykernel 6.19.2 ipyparallel 8.6.1 ipython 8.15.0 ipython-genutils 0.2.0 ipywidgets 8.1.1 isoduration 20.11.0 itsdangerous 2.1.2 jedi 0.18.1 Jinja2 3.1.2 joblib 1.3.1 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter_client 8.3.1 jupyter_core 5.2.0 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.3 jupyter_server_terminals 0.4.4 jupyterlab 4.0.6 jupyterlab-pygments 0.2.2 jupyterlab_server 2.25.0 jupyterlab-widgets 3.0.9 kaitaistruct 0.10 keras 2.13.1 keyboard 0.13.5 Kivy 2.2.1 kivy-deps.angle 0.3.3 kivy-deps.glew 0.3.1 kivy-deps.sdl2 0.6.0 Kivy-Garden 0.1.5 kiwisolver 1.4.4 lazy_loader 0.3 ldap3 2.9.1 libclang 16.0.6 Markdown 3.4.4 markdown-it-py 3.0.0 MarkupSafe 2.1.1 matplotlib 3.7.1 matplotlib-inline 0.1.6 mdurl 0.1.2 mistune 3.0.1 mitmproxy 9.0.1 mitmproxy_wireguard 0.1.23 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 MouseInfo 0.1.3 mpmath 1.2.1 msgpack 1.0.7 mss 9.0.1 munkres 1.1.4 mypy-extensions 1.0.0 Naked 0.1.32 nbclient 0.8.0 nbconvert 7.8.0 nbformat 5.9.2 nest-asyncio 1.5.6 networkx 2.8.4 notebook 7.0.4 notebook_shim 0.2.3 numexpr 2.8.4 numpy 1.23.5 oauthlib 3.2.2 opencv-python 4.8.1.78 openpyxl 3.1.2 opt-einsum 3.3.0 outcome 1.2.0 overrides 7.4.0 packaging 23.0 pandas 1.5.3 pandocfilters 1.5.0 parso 0.8.3 passlib 1.7.4 pathspec 0.11.2 pickleshare 0.7.5 Pillow 9.4.0 pip 23.3.1 platformdirs 3.11.0 pluggy 1.3.0 ply 3.11 portpicker 1.2.0 prometheus-client 0.17.1 prompt-toolkit 3.0.36 protobuf 4.24.0 psutil 5.9.0 publicsuffix2 2.20191221 pure-eval 0.2.2 py 1.11.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 PyAudio 0.2.13 PyAutoGUI 0.9.54 pycparser 2.21 pycryptodome 3.19.0 pydivert 2.1.0 pydub 0.25.1 pygame 2.5.2 PyGetWindow 0.0.9 Pygments 2.16.1 PyMsgBox 1.0.9 pynput 1.7.6 pyOpenSSL 22.1.0 pyparsing 3.0.9 pyperclip 1.8.2 pypiwin32 223 pyproject_hooks 1.0.0 PyQt5 5.15.7 PyQt5-sip 12.11.0 PyRect 0.2.0 pyscreenshot 3.1 PyScreeze 0.1.29 PySocks 1.7.1 pytest 6.2.5 pytest-asyncio 0.20.3 python-dateutil 2.8.2 python-json-logger 2.0.7 python-slugify 8.0.1 pythonnet 3.0.3 pytweening 1.0.7 pytz 2022.7 pywin32 305.1 pywinpty 2.0.11 PyYAML 6.0.1 pyzmq 25.1.1 qtconsole 5.4.4 QtPy 2.4.0 referencing 0.30.2 requests 2.28.1 requests-oauthlib 1.3.1 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.6.0 rpds-py 0.10.3 rsa 4.9 ruamel.yaml 0.17.35 ruamel.yaml.clib 0.2.8 scikit-image 0.22.0 scikit-learn 1.3.0 scipy 1.11.1 Send2Trash 1.8.2 setuptools 68.2.2 shellescape 3.8.1 simplegeneric 0.8.1 sip 6.6.2 six 1.12.0 smmap 5.0.1 sniffio 1.3.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soupsieve 2.5 Sphinx 7.2.6 sphinx-rtd-theme 1.3.0 sphinxcontrib-applehelp 1.0.7 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jquery 4.1 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.6 sphinxcontrib-serializinghtml 1.1.9 spyder-kernels 2.1.3 stack-data 0.2.0 sympy 1.11.1 tensorboard 2.13.0 tensorboard-data-server 0.7.1 tensorflow 2.13.0 tensorflow-estimator 2.13.0 tensorflow-intel 2.13.0 tensorflow-io-gcs-filesystem 0.31.0 termcolor 2.3.0 terminado 0.17.1 testpath 0.6.0 text-unidecode 1.3 threadpoolctl 3.2.0 tifffile 2023.9.26 tinycss2 1.2.1 toga 0.3.1 toga-core 0.3.1 toga-winforms 0.3.1 toml 0.10.2 tomli 2.0.1 tomli_w 1.0.0 torch 2.0.0 torchaudio 2.0.0 torchvision 0.15.0 tornado 6.3.3 tqdm 4.66.1 traitlets 5.7.1 travertino 0.3.0 trio 0.22.2 typing_extensions 4.4.0 uri-template 1.3.0 urllib3 1.24.3 urwid 2.1.2 wcwidth 0.2.5 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.3 Werkzeug 2.3.6 wheel 0.41.3 widgetsnbextension 4.0.9 win-inet-pton 1.1.0 wincertstore 0.2 wrapt 1.15.0 wsproto 1.2.0 zipp 3.11.0 zstandard 0.19.0
排查与解决步骤
- 确认工作目录:执行
briefcase dev前必须进入briefcase new生成的项目根目录(比如默认的HelloWorld文件夹),用cd 项目名称切换后重试。 - 检查配置文件存在性:确认项目根目录下是否有
pyproject.toml文件。如果缺失,重新执行briefcase new,确保全程无中断。 - 升级Briefcase版本:当前使用的0.3.16版本较旧,可能存在Python3.8兼容性问题,执行以下命令升级:
升级后重新创建项目并测试。pip install --upgrade briefcase - 更换项目路径:如果项目在Win11受保护路径(如C:\Program Files),移到普通用户目录(如C:\Users\你的用户名\Projects)后重试。
- 重新初始化项目:删除项目目录下的
.briefcase文件夹,执行briefcase init重新生成配置,再运行briefcase dev。
内容的提问来源于stack exchange,提问作者b1uesk9
相关产品推荐
相关产品推荐

