You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PyCharm中找不到tsne模块,conda安装遇连接错误如何解决?

解决PyCharm中无法安装tsne模块及CondaHTTPError问题

问题场景

在PyCharm设置中无法找到tsne模块,尝试执行conda install -c conda-forge tsne安装时,出现如下错误:

C:\Users\hp\PycharmProjects\pythonProject>conda install -c conda-forge tsne
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/win-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https//conda.anaconda.org/conda-forge/win-64'

解决方法

1. 重试安装命令

网络连接问题多为间歇性,直接重新执行安装命令:

conda install -c conda-forge tsne

2. 配置国内conda镜像源

国内访问官方源易出现连接问题,可切换为国内镜像(以清华源为例):

  • 打开CMD或Anaconda Prompt,执行以下命令添加镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
  • 配置完成后重新执行tsne安装命令。

3. 改用pip安装

若conda安装仍失败,尝试用pip安装:

pip install tsne

*注意:在PyCharm的Terminal中执行该命令,确保使用的是项目对应的Python环境。

4. 直接在PyCharm内安装

  • 打开PyCharm,进入File > Settings > Project: [你的项目名称] > Python Interpreter
  • 点击右上角的+按钮,在搜索框输入tsne,找到模块后点击Install Package完成安装。

内容的提问来源于stack exchange,提问作者Faiza Hassan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 17:32:15