在vscode激活conda环境
一、在VSCode中正确选择Python解释器
-
打开命令面板:
Cmd + Shift + P
(macOS) -
输入:
Python: Select Interpreter
-
选择你的tflite_convert环境,应该显示类似:
~/miniconda3/envs/tflite_convert/bin/python
二、验证python路经
which python # 应该显示: /opt/miniconda3/envs/tflite_convert/bin/python
三、安装指定版本的python和软件包
conda create -n tflite_convert python=3.9 "numpy<2.0"