微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

pyinstaller 导致 OSerror

如何解决pyinstaller 导致 OSerror

我运行 pyinstaller test.py 并出现以下错误

OSError: Python library not found: python3,Python,libpython3.9.dylib,libpython3.9m.dylib,.Python
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package,or unsuitable build parameters of Python installation.

* On Debian/Ubuntu,you would need to install Python development packages
  * apt-get install python3-dev
  * apt-get install python-dev
* If you're building Python by yourself,please rebuild your Python with `--enable-shared` (or,`--enable-framework` on Darwin)

我尝试了 brew install python3-devbrew install python-dev

==> Searching for a prevIoUsly deleted formula (in the last month)...
Error: No prevIoUsly deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

我运行了以下命令,但所有命令都导致了相同的错误brew reinstall python,PYTHON_CONfigURE_OPTS="--enable-shared" pyenv install 3.9.0,PYTHON_CONfigURE_OPTS="--enable-framework" pyenv install 3.9.0

卸载和安装 pyinstall 不起作用。 有人知道吗?

这是以下命令的结果:

which pyinstaller
/Users/user/.pyenv/shims/pyinstaller
which python
/Users/user/.pyenv/shims/python

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。