启动pybuilder项目后,我收到一个错误,即可执行文件无法运行,并且virtualenv不兼容

2024-05-15 17:12:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在关注pybuilder的以下helloworld教程:https://pybuilder.io/documentation/tutorial 我用的是mac电脑。我已经用brew安装了python。 我可以运行以下命令:

$ virtualenv venv
$ source venv/bin/activate
$ pip install pybuilder
$ pyb --start-project

我创建helloworld文件并运行:

$ pyb

我得到以下错误:

ERROR: The executable /Users/myusername/projects/learning/pybuilderexample/helloworld/.pybuilder/plugins/cpython-3.9.1.final.0/bin/python is not functioning
ERROR: It thinks sys.prefix is '/usr/local/Cellar/python@3.9/3.9.1_1/Frameworks/Python.framework/Versions/3.9' (should be '/Users/myusername/projects/learning/pybuilder-example/helloworld/.pybuilder/plugins/cpython-3.9.1.final.0')
ERROR: virtualenv is not compatible with this system or executable

有人能帮我克服这个错误吗?我认为这与我安装python(brew)的方式有关。然而,我不确定下一步该怎么办


Tags: binvirtualenvvenvis错误errorusershelloworld