Closed Anson2251 closed 3 weeks ago
Does your python installed via Homebrew?
If yes, please replace it with a package that support third-party pip package installed.
FYI, pkg on python.org is a good choice, or use brew install pypy3.10
as an alternative
It is not recommanded you to manage virtual environment by your own, and we can not provide support with the venv.
use
brew install pypy3.10
as an alternative
Thanks! That fix the problem. Btw, may I ask, what are the drawbacks of using a virtual environment for cpc?
Well... Actually we never test our software in a virtual environment. This is the only drawback😂.
Maybe you can test it and provide a best practice.👍
We have already made changes inout latest installation method which depends on Homebrew completely.
问题描述
I tried to use the
CAIE_Code_Installer.dmg
file to install thecpc
. But my python was installed by brew and the environment is managed by it. In this way,cpc
cannot install all the dependencies it needs. When I runcpc
, python shows the following error.I tried to use brew to install these dependencies, but it seems ply has been disabled by brew.
复现方法
cpc
viaCAIE_Code_Installer.dmg
cpc
版本信息
cpc v0.1.4 Python 3.12.4 Darwin 23.6.0
额外说明
With my limited programming experience with Python,
venv
can be used to solve this problem, as it provides a virtual environment and brew won't lock it.I tried setting up a
venv
with the following command.By the way, the
venv
have to be activated before runningcpc
.If
venv
can be set up before the first running, it can solve the problem almost perfectly, except for one small flaw, which is the manual execution of the activation command.A patch can be applied to the
/bin/cpc
to activate thevenv
before running.Thanks in advance for your attention to this matter!