Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问基于 python 哪个版本 #4

Open
mice33 opened this issue Feb 1, 2024 · 9 comments
Open

请问基于 python 哪个版本 #4

mice33 opened this issue Feb 1, 2024 · 9 comments

Comments

@mice33
Copy link

mice33 commented Feb 1, 2024

使用了 3.9.2 和 3.7.15,安装依赖都有不同组件报错

@junyangwang0410
Copy link
Collaborator

使用了 3.9.2 和 3.7.15,安装依赖都有不同组件报错

我使用的是 3.10.6

@mice33
Copy link
Author

mice33 commented Feb 1, 2024

ERROR: Could not find a version that satisfies the requirement TensorFlow==2.9.1 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for TensorFlow==2.9.1

3.10.6 会有以上报错

@junyangwang0410
Copy link
Collaborator

ERROR: Could not find a version that satisfies the requirement TensorFlow==2.9.1 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0) ERROR: No matching distribution found for TensorFlow==2.9.1

3.10.6 会有以上报错

也许可以尝试取消一下requirements.txt里的版本限制,然后运行尝试看看能否成功

@javalovejava
Copy link

conda create -n mobileagent python=3.9.11

修改requirements.txt:
TensorFlow==2.13.0
keras==2.13.1

在mac下成功执行

@twiceyuan
Copy link

conda create -n mobileagent python=3.9.11

修改requirements.txt: TensorFlow==2.13.0 keras==2.13.1

在mac下成功执行

试了这个,但是使用 README 中使用自己 API Key 运行也是报错的:

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

@junyangwang0410
Copy link
Collaborator

conda create -n mobileagent python=3.9.11
修改requirements.txt: TensorFlow==2.13.0 keras==2.13.1
在mac下成功执行

试了这个,但是使用 README 中使用自己 API Key 运行也是报错的:

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

我们用了较低版本的TensorFlow和keras来适应OCR模型,如果你的这两个库版本过高,会出现这个报错。我们推荐在python3.10下,安装requirements.txt里的环境。

@twiceyuan
Copy link

conda create -n mobileagent python=3.9.11
修改requirements.txt: TensorFlow==2.13.0 keras==2.13.1
在mac下成功执行

试了这个,但是使用 README 中使用自己 API Key 运行也是报错的:

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

我们用了较低版本的TensorFlow和keras来适应OCR模型,如果你的这两个库版本过高,会出现这个报错。我们推荐在python3.10下,安装requirements.txt里的环境。

不修改 tf 和 keras 版本的话,在 arm64 架构的 macOS 上安装找不到对应的包,上面也有人提到这个:

ERROR: Could not find a version that satisfies the requirement TensorFlow==2.9.1 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for TensorFlow==2.9.1

@junyangwang0410
Copy link
Collaborator

junyangwang0410 commented Feb 23, 2024

conda create -n mobileagent python=3.9.11
修改requirements.txt: TensorFlow==2.13.0 keras==2.13.1
在mac下成功执行

试了这个,但是使用 README 中使用自己 API Key 运行也是报错的:

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

我们用了较低版本的TensorFlow和keras来适应OCR模型,如果你的这两个库版本过高,会出现这个报错。我们推荐在python3.10下,安装requirements.txt里的环境。

不修改 tf 和 keras 版本的话,在 arm64 架构的 macOS 上安装找不到对应的包,上面也有人提到这个:

ERROR: Could not find a version that satisfies the requirement TensorFlow==2.9.1 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for TensorFlow==2.9.1

https://pypi.org/project/tensorflow/2.9.1/#files
应该是python版本问题,导致早的TensorFlow无法安装了

@twiceyuan
Copy link

conda create -n mobileagent python=3.9.11
修改requirements.txt: TensorFlow==2.13.0 keras==2.13.1
在mac下成功执行

试了这个,但是使用 README 中使用自己 API Key 运行也是报错的:

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

我们用了较低版本的TensorFlow和keras来适应OCR模型,如果你的这两个库版本过高,会出现这个报错。我们推荐在python3.10下,安装requirements.txt里的环境。

不修改 tf 和 keras 版本的话,在 arm64 架构的 macOS 上安装找不到对应的包,上面也有人提到这个:

ERROR: Could not find a version that satisfies the requirement TensorFlow==2.9.1 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for TensorFlow==2.9.1

https://pypi.org/project/tensorflow/2.9.1/#files 应该是python版本问题,导致早的TensorFlow无法安装了

确实是这个原因,macOS 下早期版本 tensorflow 使用了不同的包名,改成这个就好了:

tensorflow-macos==2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants