首页 > 解决方案 > ModuleNotFoundError:没有名为“tensorflow_quantum”的模块

问题描述

我正在使用 Python 3.8(64 位)

基本上,我尝试了互联网上所有可能的解决方案,比如更新 python 版本和 tensorflow 版本等。

但是当我尝试这样做时:

import tensorflow_quantum as tfq

终端总是说:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow_quantum'

有人对这个问题有任何想法吗?干杯

标签: pythontensorflowquantum-computingtensorflow-quantum

解决方案


请运行以下命令:

pip3 install --upgrade pip
pip3 install tensorflow==2.3.1
pip3 install -U tensorflow-quantum

推荐阅读