破伤风的土豆 发表于 2022-7-14 16:49:43

pip install tensorflow一直报错

新人,不知道怎么描述,算是插件吧,目前看需要用软件自带的python,现在在给这个python配置tensorflow,但是一直报错。报错显示如下:

D:\BIMBase\BIMBase Parametric\PythonScript\python-3.7.9-embed-amd64>pip install tensorflow
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
Collecting tensorflow
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/af/f2/b9ebc1355c2d48c5823f9a33bfd91d885c1499846080eebc4ea21f5e509d/tensorflow-2.9.1-cp37-cp37m-win_amd64.whl (444.0 MB)
Collecting flatbuffers<2,>=1.12
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/eb/26/712e578c5f14e26ae3314c39a1bdc4eb2ec2f4ddc89b708cf8e0a0d20423/flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting google-pasta>=0.1.1
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/a3/de/c648ef6835192e6e2cc03f40b19eeda4382c49b5bafb43d88b931c4c74ac/google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: absl-py>=1.0.0 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: tensorboard<2.10,>=2.9 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (2.9.1)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (1.47.0)
Requirement already satisfied: six>=1.12.0 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (1.16.0)
Collecting gast<=0.4.0,>=0.2.1
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/b6/48/583c032b79ae5b3daa02225a675aeb673e58d2cb698e78510feceb11958c/gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/c3/a4/ca66ec75620d7e0dc488a22eced633fe5233e82df0c552be3dbf04bfe2d4/tensorflow_io_gcs_filesystem-0.26.0-cp37-cp37m-win_amd64.whl (1.5 MB)
Collecting astunparse>=1.6.0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting keras<2.10.0,>=2.9.0rc0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/ff/ff/f25909606aed26981a8bd6d263f89d64a20ca5e5316e6aafb4c75d9ec8ae/keras-2.9.0-py2.py3-none-any.whl (1.6 MB)
Requirement already satisfied: typing-extensions>=3.6.6 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (4.3.0)
Requirement already satisfied: numpy>=1.20 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (1.21.6)
Collecting wrapt>=1.11.0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/e7/a1/a9596c5858c4a58be8cdd5e8b0e5f53f9c1c17f0616b47edde8de1a356fe/wrapt-1.14.1-cp37-cp37m-win_amd64.whl (35 kB)
Collecting tensorflow-estimator<2.10.0,>=2.9.0rc0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/61/e1/a72ec68403d91ba433018db58859fd4706642aa9d0fb44ff778934fc4c2c/tensorflow_estimator-2.9.0-py2.py3-none-any.whl (438 kB)
Collecting h5py>=2.9.0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/b1/ea/0fe3795ae908f8bbeb56cd1a416903480e4a6d97c8a0ab9cf2f726689cbc/h5py-3.7.0-cp37-cp37m-win_amd64.whl (2.6 MB)
Requirement already satisfied: setuptools in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (63.1.0)
Collecting opt-einsum>=2.3.2
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/bc/19/404708a7e54ad2798907210462fd950c3442ea51acc8790f3da48d2bee8b/opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Requirement already satisfied: packaging in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (21.3)
Requirement already satisfied: protobuf<3.20,>=3.9.2 in d:\bimbase\bimbase parametric\pythonscript\python-3.7.9-embed-amd64\lib\site-packages (from tensorflow) (3.19.4)
Collecting keras-preprocessing>=1.1.1
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/79/4c/7c3275a01e12ef9368a892926ab932b33bb13d55794881e3573482b378a7/Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Collecting termcolor>=1.1.0
Using cached https://mirrors.bfsu.edu.cn/pypi/web/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz (3.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─>
      Traceback (most recent call last):
      File "<string>", line 36, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "C:\Users\shin\AppData\Local\Temp\pip-install-45xikr6k\termcolor_25b1cb8fa14a45a3b26af510f015cf75\setup.py", line 35, in <module>
          from termcolor import VERSION
      ModuleNotFoundError: No module named 'termcolor'
      

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我看着像是termcolor没安装,但是pip install termcolor同样报错

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─>
      Traceback (most recent call last):
      File "<string>", line 36, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "C:\Users\shin\AppData\Local\Temp\pip-install-eh_h7seb\termcolor_d1810da4ff784ebca5d302d1162fffa6\setup.py", line 35, in <module>
          from termcolor import VERSION
      ModuleNotFoundError: No module named 'termcolor'
      

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

jackz007 发表于 2022-7-14 16:49:44

破伤风的土豆 发表于 2022-7-18 23:55
我把termcolor卸载后重新安装也是报错这个no module named termcolor,然后我从网上下了一个termcolor-wh ...

https://files.pythonhosted.org/packages/2b/ad/9e826b1bd69dc3faa5abb7b6459528e16831c0e73b353479a467ed5ee995/termcolor_whl-1.1.2-py2.py3-none-any.whl

Victor0321 发表于 2022-7-15 00:18:00

你这装的是conda版还是不是conda版本阿

于能能 发表于 2022-7-15 18:06:50

同类型问题(但不知道处理方式能否通用)
安装路径中应该有两个pip文件,都删掉,然后用pycharm重新安装pip

jackz007 发表于 2022-7-16 01:15:33

本帖最后由 jackz007 于 2022-7-16 01:16 编辑

      看上去,问题确实出在 termcolor 模块没能正确安装上,可是,在我这里是可以正常安装的。
D:\\C>pip install termcolor
Collecting termcolor
Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10ea4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Installing collected packages: termcolor
Running setup.py install for termcolor
Successfully installed termcolor-1.1.0
You are using pip version 7.1.2, however version 22.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' com
and.

D:\\C>

破伤风的土豆 发表于 2022-7-18 23:46:44

Victor0321 发表于 2022-7-15 00:18
你这装的是conda版还是不是conda版本阿

我电脑之前先用anaconda装过一次,用的conda install,用的pycharm编译,后来比赛方给的要求用vscode编译,而且需要的是用他们给安装包里的python(这个才能和他们的软件联动),然后我用这个进行pip安装时就出现了报错,是因为之前用conda安过一次吗

破伤风的土豆 发表于 2022-7-18 23:55:31

jackz007 发表于 2022-7-16 01:15
看上去,问题确实出在 termcolor 模块没能正确安装上,可是,在我这里是可以正常安装的。

我把termcolor卸载后重新安装也是报错这个no module named termcolor,然后我从网上下了一个termcolor-whl,安装后显示安装成功,但是show的时候显示没有这个。接着安装tensorflow时不在报错前面那个了,改为了cannot import name 'VERSION' from 'termcolor'。是我安装的termcolor有问题吗?你有没有离线包,能发我一下吗?
页: [1]
查看完整版本: pip install tensorflow一直报错