已安装TensorFlow 2.8.0却无法导入ParametricUMAP的问题求助
已安装TensorFlow 2.8.0却无法导入ParametricUMAP的问题求助
各位好,我最近在尝试使用Parametric UMAP工具时遇到了一个头疼的问题,想请大家帮忙排查下原因。
我运行的代码非常简单:
from umap import ParametricUMAP p_embedder = ParametricUMAP()
但执行后直接抛出了错误,错误日志如下:
C:\Users\ldsp_\miniconda3\envs\tf-gpu\lib\site-packages\umap\__init__.py:16: UserWarning: The umap.parametric_umap package requires Tensorflow > 2.0 to be installed. You can install Tensorflow via official installation methods or you can install the CPU version of Tensorflow using pip install umap-learn[parametric_umap] warn( Traceback (most recent call last): Cell In[7], line 1 p_embedder = ParametricUMAP() File ~\miniconda3\envs\tf-gpu\lib\site-packages\umap\__init__.py:26 in __init__ raise ImportError( ImportError: umap.parametric_umap requires Tensorflow >= 2.0
可问题在于,我已经安装了TensorFlow 2.8.0!用pip list命令验证的结果如下,能清楚看到tensorflow的版本确实是2.8.0:
Package Version ----------------------------- ------------------- tensorboard 2.8.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow 2.8.0 tensorflow-estimator 2.5.0 tensorflow-io-gcs-filesystem 0.31.0 Note: you may need to restart the kernel to use updated packages.
我已经在UMAP的GitHub仓库里搜索过相关问题,但没找到类似案例。有没有大佬能帮我分析下可能的原因,以及对应的解决方法呢?
备注:内容来源于stack exchange,提问作者Murilo
相关产品推荐
相关产品推荐

