conda踩坑

2024-12-02

python

当你厌恶你身边的人,你表达厌恶最好的方式不是和他们争吵,而是自己勤快点儿,加把劲离开他们。那样,他们就永远从你的生活中消失,和死了差不多。——于宙

我们知道conda用于创建python隔离环境,但是今天我用时报错了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
(base) Github-Id-VampireAchao:tmp achao$ conda create -n hssw-video-chat python=3.10 --no-plugins
usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...
conda: error: unrecognized arguments: --no-plugins
(base) Github-Id-VampireAchao:tmp achao$ conda create -n hssw-video-chat python=3.10
Channels:
- defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/exception_handler.py", line 18, in __call__
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/cli/main.py", line 61, in main_subshell
exit_code = do_call(args, parser)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/cli/conda_argparse.py", line 205, in do_call
result = getattr(module, func_name)(args, parser)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/notices/core.py", line 132, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/cli/main_create.py", line 154, in execute
return install(args, parser, "create")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/cli/install.py", line 417, in install
unlink_link_transaction = solver.solve_for_transaction(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/core/solve.py", line 152, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/core/solve.py", line 221, in solve_for_diff
final_precs = self.solve_final_state(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda_libmamba_solver/solver.py", line 231, in solve_final_state
index = IndexHelper(
^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 136, in __init__
self._index = self._load_channels()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 335, in _load_channels
jsons = {url: str(path) for (url, path) in executor.map(self._fetch_channel, urls)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda_libmamba_solver/index.py", line 254, in _fetch_channel
json_path, _ = subdir_data.repo_fetch.fetch_latest_path()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 749, in fetch_latest_path
_, state = self.fetch_latest()
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 789, in fetch_latest
cache.load_state()
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 585, in load_state
self.load(state_only=True)
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 532, in load
with self.lock("r+") as state_file:
^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/conda/gateways/repodata/__init__.py", line 651, in lock
with self.cache_path_state.open(mode) as state_file, lock(state_file):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/pathlib.py", line 1013, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/opt/homebrew/Caskroom/miniconda/base/pkgs/cache/9e99ffaf.info.json'

`$ /opt/homebrew/Caskroom/miniconda/base/bin/conda create -n hssw-video-chat python=3.10`

environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=/opt/homebrew/Caskroom/miniconda/base/bin/conda
CONDA_PREFIX=/opt/homebrew/Caskroom/miniconda/base
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/opt/homebrew/Caskroom/miniconda/base/bin/python
CONDA_ROOT=/opt/homebrew/Caskroom/miniconda/base
CONDA_SHLVL=1
CURL_CA_BUNDLE=<not set>
LD_PRELOAD=<not set>
PATH=/opt/homebrew/Caskroom/miniconda/base/bin:/opt/homebrew/Caskroom/minic
onda/base/condabin:/Users/achao/.rbenv/shims:/Users/achao/.cargo/bin:/
Users/achao/.cargo/bin:/usr/local/bison-
2.7/bin:/Users/achao/.phpenv/shims:/Users/achao/.phpenv/bin:/opt/homeb
rew/opt/zlib/bin:/opt/homebrew/opt/tidy-html5/bin:/opt/homebrew/opt/on
iguruma/bin:/opt/homebrew/opt/libiconv/bin:/opt/homebrew/opt/libzip/bi
n:/opt/homebrew/opt/libxml2/bin:/opt/homebrew/opt/readline/bin:/opt/ho
mebrew/opt/openssl@3/bin:/opt/homebrew/opt/bzip2/bin:/Users/achao/.sdk
man/candidates/java/current/bin:/Users/achao/.yarn/bin:/Users/achao/.p
yenv/shims:/Users/achao/Library/Java/JavaVirtualMachines/azul-
1.8.0_372/Contents/Home:/Users/achao/.nvm/versions/node/v20.6.1/bin:/u
sr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sb
in:/opt/homebrew/bin:/opt/homebrew/opt/nvm:/var/run/com.apple.security
.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.secu
rity.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.securi
ty.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Appl
e/usr/bin:/usr/local/MacGPG2/bin:/Users/achao/Library/Application Supp
ort/JetBrains/Toolbox/scripts:/Users/achao/.local/bin:/Users/achao/.m2
/wrapper/dists/apache-
maven-3.8.4-bin/52ccbt68d252mdldqsfsn03jlf/apache-maven-3.8.4/bin
PKG_CONFIG_PATH=/opt/homebrew/opt/zlib/lib/pkgconfig:/opt/homebrew/opt/tidy-html5/lib/
pkgconfig:/opt/homebrew/opt/oniguruma/lib/pkgconfig:/opt/homebrew/opt/
libiconv/lib/pkgconfig:/opt/homebrew/opt/libzip/lib/pkgconfig:/opt/hom
ebrew/opt/libxml2/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconf
ig:/opt/homebrew/opt/openssl@3/lib/pkgconfig:/opt/homebrew/opt/bzip2/l
ib/pkgconfig:
PYTHON_BUILD_MIRROR_URL=https://mirrors.huaweicloud.com/python/
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
all_proxy=<set>
http_proxy=<set>
https_proxy=<set>

active environment : base
active env location : /opt/homebrew/Caskroom/miniconda/base
shell level : 1
user config file : /Users/achao/.condarc
populated config files : /opt/homebrew/Caskroom/miniconda/base/.condarc
conda version : 24.9.2
conda-build version : not installed
python version : 3.12.7.final.0
solver : libmamba (default)
virtual packages : __archspec=1=m2
__conda=24.9.2=0
__osx=15.1.1=0
__unix=0=0
base environment : /opt/homebrew/Caskroom/miniconda/base (writable)
conda av data dir : /opt/homebrew/Caskroom/miniconda/base/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-arm64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/homebrew/Caskroom/miniconda/base/pkgs
/Users/achao/.conda/pkgs
envs directories : /opt/homebrew/Caskroom/miniconda/base/envs
/Users/achao/.conda/envs
platform : osx-arm64
user-agent : conda/24.9.2 requests/2.32.3 CPython/3.12.7 Darwin/24.1.0 OSX/15.1.1 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/.
UID:GID : 501:20
netrc file : None
offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload did not complete.

Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running

$ conda config --set report_errors true

(base) Github-Id-VampireAchao:tmp achao$ sudo conda create -n hssw-video-chat python=3.10
Password:
Channels:
- defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

environment location: /opt/homebrew/Caskroom/miniconda/base/envs/hssw-video-chat

added / updated specs:
- python=3.10


The following packages will be downloaded:

package | build
---------------------------|-----------------
ca-certificates-2024.11.26 | hca03da5_0 132 KB
------------------------------------------------------------
Total: 132 KB

The following NEW packages will be INSTALLED:

bzip2 pkgs/main/osx-arm64::bzip2-1.0.8-h80987f9_6
ca-certificates pkgs/main/osx-arm64::ca-certificates-2024.11.26-hca03da5_0
libffi pkgs/main/osx-arm64::libffi-3.4.4-hca03da5_1
ncurses pkgs/main/osx-arm64::ncurses-6.4-h313beb8_0
openssl pkgs/main/osx-arm64::openssl-3.0.15-h80987f9_0
pip pkgs/main/osx-arm64::pip-24.2-py310hca03da5_0
python pkgs/main/osx-arm64::python-3.10.15-hb885b13_1
readline pkgs/main/osx-arm64::readline-8.2-h1a28f6b_0
setuptools pkgs/main/osx-arm64::setuptools-75.1.0-py310hca03da5_0
sqlite pkgs/main/osx-arm64::sqlite-3.45.3-h80987f9_0
tk pkgs/main/osx-arm64::tk-8.6.14-h6ba3021_0
tzdata pkgs/main/noarch::tzdata-2024b-h04d1e81_0
wheel pkgs/main/osx-arm64::wheel-0.44.0-py310hca03da5_0
xz pkgs/main/osx-arm64::xz-5.4.6-h80987f9_1
zlib pkgs/main/osx-arm64::zlib-1.2.13-h18a0788_1


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate hssw-video-chat
#
# To deactivate an active environment, use
#
# $ conda deactivate

(base) Github-Id-VampireAchao:tmp achao$
(base) Github-Id-VampireAchao:tmp achao$ conda activate hssw-video-chat
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ PWD
/Users/achao/Downloads/tmp
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple
Requirement already satisfied: opencv-python in /Users/achao/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (4.10.0.84)
Requirement already satisfied: python-dotenv in /Users/achao/.local/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (1.0.1)
Collecting pyaudio (from -r requirements.txt (line 6))
Downloading PyAudio-0.2.14.tar.gz (47 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting soundfile (from -r requirements.txt (line 7))
Downloading soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl.metadata (14 kB)
Collecting SpeechRecognition (from -r requirements.txt (line 8))
Downloading SpeechRecognition-3.11.0-py2.py3-none-any.whl.metadata (28 kB)
Collecting loguru (from -r requirements.txt (line 9))
Downloading loguru-0.7.2-py3-none-any.whl.metadata (23 kB)
Requirement already satisfied: numpy>=1.21.2 in /Users/achao/.local/lib/python3.10/site-packages (from opencv-python->-r requirements.txt (line 1)) (1.26.4)
Collecting cffi>=1.0 (from soundfile->-r requirements.txt (line 7))
Downloading cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl.metadata (1.5 kB)
Requirement already satisfied: requests>=2.26.0 in /Users/achao/.local/lib/python3.10/site-packages (from SpeechRecognition->-r requirements.txt (line 8)) (2.32.3)
Requirement already satisfied: typing-extensions in /Users/achao/.local/lib/python3.10/site-packages (from SpeechRecognition->-r requirements.txt (line 8)) (4.12.2)
Collecting pycparser (from cffi>=1.0->soundfile->-r requirements.txt (line 7))
Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (3.4.0)
Requirement already satisfied: idna<4,>=2.5 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (2024.8.30)
Downloading soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 3.5 MB/s eta 0:00:00
Downloading SpeechRecognition-3.11.0-py2.py3-none-any.whl (32.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 32.8/32.8 MB 14.4 MB/s eta 0:00:00
Downloading loguru-0.7.2-py3-none-any.whl (62 kB)
Downloading cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl (178 kB)
Downloading pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pyaudio (pyproject.toml) did not run successfully.
exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.macosx-11.1-arm64-cpython-310/pyaudio
copying src/pyaudio/__init__.py -> build/lib.macosx-11.1-arm64-cpython-310/pyaudio
running build_ext
building 'pyaudio._portaudio' extension
creating build/temp.macosx-11.1-arm64-cpython-310/src/pyaudio
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/hssw-video-chat/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/hssw-video-chat/include -arch arm64 -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/tidy-html5/include -I/opt/homebrew/opt/oniguruma/include -I/opt/homebrew/opt/libiconv/include -I/opt/homebrew/opt/libzip/include -I/opt/homebrew/opt/libxml2/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/opt/bzip2/include -DMACOS=1 -I/usr/local/include -I/usr/include -I/opt/homebrew/include -I/opt/homebrew/Caskroom/miniconda/base/envs/hssw-video-chat/include/python3.10 -c src/pyaudio/device_api.c -o build/temp.macosx-11.1-arm64-cpython-310/src/pyaudio/device_api.o
src/pyaudio/device_api.c:9:10: fatal error: 'portaudio.h' file not found
9 | #include "portaudio.h"
| ^~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyaudio)
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple
Requirement already satisfied: opencv-python in /Users/achao/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (4.10.0.84)
Requirement already satisfied: python-dotenv in /Users/achao/.local/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (1.0.1)
Collecting soundfile (from -r requirements.txt (line 7))
Using cached soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl.metadata (14 kB)
Collecting SpeechRecognition (from -r requirements.txt (line 8))
Using cached SpeechRecognition-3.11.0-py2.py3-none-any.whl.metadata (28 kB)
Collecting loguru (from -r requirements.txt (line 9))
Using cached loguru-0.7.2-py3-none-any.whl.metadata (23 kB)
Requirement already satisfied: numpy>=1.21.2 in /Users/achao/.local/lib/python3.10/site-packages (from opencv-python->-r requirements.txt (line 1)) (1.26.4)
Collecting cffi>=1.0 (from soundfile->-r requirements.txt (line 7))
Using cached cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl.metadata (1.5 kB)
Requirement already satisfied: requests>=2.26.0 in /Users/achao/.local/lib/python3.10/site-packages (from SpeechRecognition->-r requirements.txt (line 8)) (2.32.3)
Requirement already satisfied: typing-extensions in /Users/achao/.local/lib/python3.10/site-packages (from SpeechRecognition->-r requirements.txt (line 8)) (4.12.2)
Collecting pycparser (from cffi>=1.0->soundfile->-r requirements.txt (line 7))
Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (3.4.0)
Requirement already satisfied: idna<4,>=2.5 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (2.2.3)
Requirement already satisfied: certifi>=2017.4.17 in /Users/achao/.local/lib/python3.10/site-packages (from requests>=2.26.0->SpeechRecognition->-r requirements.txt (line 8)) (2024.8.30)
Using cached soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl (1.1 MB)
Using cached SpeechRecognition-3.11.0-py2.py3-none-any.whl (32.8 MB)
Using cached loguru-0.7.2-py3-none-any.whl (62 kB)
Using cached cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl (178 kB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Installing collected packages: pycparser, loguru, SpeechRecognition, cffi, soundfile
Successfully installed SpeechRecognition-3.11.0 cffi-1.17.1 loguru-0.7.2 pycparser-2.22 soundfile-0.12.1
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ brew install portaudio
==> Fetching portaudio
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/portaudio-19.7.0.arm64_sequoia.bottle.1.tar.gz
################################################################################################################# 100.0%
==> Pouring portaudio-19.7.0.arm64_sequoia.bottle.1.tar.gz
🍺 /opt/homebrew/Cellar/portaudio/19.7.0: 34 files, 545.9KB
==> Running `brew cleanup portaudio`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ pip install pyaudio
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple
Collecting pyaudio
Using cached PyAudio-0.2.14.tar.gz (47 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... done
Created wheel for pyaudio: filename=PyAudio-0.2.14-cp310-cp310-macosx_11_0_arm64.whl size=24139 sha256=ed38d6b0af51f840aa1ee28da845476b5eac29bcbd1179839d7e8fa8e384863e
Stored in directory: /Users/achao/Library/Caches/pip/wheels/d6/21/f4/0b51d41ba79e51b16295cbb096ec49f334792814d545b508c5
Successfully built pyaudio
Installing collected packages: pyaudio
Successfully installed pyaudio-0.2.14
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ conda --prefix
usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...
conda: error: the following arguments are required: COMMAND
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ brew --prefix conda
Error: No available formula with the name "conda". Did you mean confd, conan or conman?
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ brew --prefix miniconda
Error: No available formula with the name "miniconda". Did you mean minica, minicom or minidlna?
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ brew --prefix miniconda
whError: No available formula with the name "miniconda". Did you mean minica, minicom or minidlna?
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ where is conda
-bash: where: command not found
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ where is miniconda
-bash: where: command not found
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ brew --prefix miniconda
Error: No available formula with the name "miniconda". Did you mean minica, minicom or minidlna?
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$ pip install python-multipart
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple
Collecting python-multipart
Downloading python_multipart-0.0.19-py3-none-any.whl.metadata (1.8 kB)
Downloading python_multipart-0.0.19-py3-none-any.whl (24 kB)
Installing collected packages: python-multipart
Successfully installed python-multipart-0.0.19
(hssw-video-chat) Github-Id-VampireAchao:tmp achao$

其实主要是这个:

1
PermissionError: [Errno 13] Permission denied: '/opt/homebrew/Caskroom/miniconda/base/pkgs/cache/9e99ffaf.info.json'

我们在mac加上用sudo运行就好了…