conda虚拟环境中安装flask_restplus失败的问题求助
conda虚拟环境中安装flask_restplus失败的问题求助
大家好,我现在在conda虚拟环境里安装flask_restplus遇到了一堆棘手的问题,想请教下社区里有没有朋友能给点解决思路:
- 明明已经确认激活了目标虚拟环境,但执行
pip install flask_restplus时,包却被安装到了/opt/homebrew/lib/python3.11/site-packages这个非虚拟环境的目录里,完全没装到我当前的环境中。 - 尝试用conda直接安装,执行
conda install flask_restplus后出现了如下报错:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
flask_restplus
我已经尝试过以下几种解决方法,但都没成功:
- 把其他环境的site-packages目录内容复制到当前conda环境中,无效
- 新建一个全新的conda环境后重新尝试安装,依然失败
- 以
/opt/homebrew/Caskroom/miniconda/base为基础创建新环境再安装,还是没用 - 尝试使用conda-forge源安装,执行
conda install -c conda-forge flask-restplus,依然无法成功
有没有大佬遇到过类似的问题?或者有什么可行的解决办法吗?
备注:内容来源于stack exchange,提问作者Goony_bot
相关产品推荐
相关产品推荐

