即使安装了 Tensorflow,也无法识别它

时间:2021-05-02 22:39:33

标签: python windows tensorflow anaconda gpu

我正在尝试在我的 Windows 电脑上运行 spot-rna。这台电脑绝对是全新的,今天打开了。 我已经安装了 python 3.6 和 anaconda3。我还在虚拟环境中安装了 tensorflow。 基本上,我遵循了此处给出的安装步骤(用于 gpu):https://github.com/jaswindersingh2/SPOT-RNA

这是我的用户的路径:

enter image description here

这是我的系统变量路径:

enter image description here

但是,当我尝试运行测试命令时,它无法识别 tensorflow

enter image description here

我还使用 pip install --ignore-installed --upgrade tensorflow 将 tensorflow 更新到 2.4.1。当我在命令提示符下再次运行 test 命令时,我仍然遇到同样的问题,它说没有名为“tensorflow”的模块。我错过了什么?任何帮助表示赞赏!

更新:

我删除了所有内容(包括 anaconda 和 python)。然后我安装了python 3.9.4(此时是最新的)。在命令提示符下,我写了以下命令:

pip install virtualenv

c:\users\ankit\python\python39\python.exe -m pip install --upgrade pip

然后我在 c:\users\ankit 中创建了一个名为 VirtualEnvironments 的文件夹,我在其中创建了名为 venv 的虚拟环境并使用以下命令将其激活:

virtualenv -p python3.9.4 venv

.\venv\Scripts\activate

然后我用 pip install tensorflow

安装了 tenserflow 2.5.0(最新版本)

然后,在同一个文件夹(VirtualEnvironments)中,我安装了 SPOT-RNA:

git clone https://github.com/jaswindersingh2/SPOT-RNA.git

cd SPOT-RNA

wget "https://www.dropbox.com/s/dsrcf460nbjqpxa/SPOT-RNA-models.tar.gz" || wget -O SPOT-RNA-models.tar.gz "https://app.nihaocloud.com/f/fbf3315a91d542c0bdc2/?dl=1"

tar -xvzf SPOT-RNA-models.tar.gz && del SPOT-RNA-models.tar.gz

在 VirtualEnvironment 路径(C:\Users\ankit\VirtualEnvironments)中,我安装了 pandas、numpy 和 tq​​dm。然后我进入 SPOT-RNA 并运行命令 再次py SPOT-RNA.py --inputs sample_inputs/batch_seq.fasta --outputs 'outputs/' --gpu 0。它解决了最初无法识别 tenserflow 的问题,但 tenserflow/cuda 和一些库似乎仍然存在问题。我错过了某个地方的下载吗?文档似乎说如果我使用 gpu,我不需要安装 CUDA 和 cuDNN。

enter image description here

0 个答案:

没有答案