ImportError:需要“pyparsing”包

2024-05-19 22:26:48 发布

您现在位置:Python中文网/ 问答频道 /正文

ImportError: The 'pyparsing' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.

我似乎找不到问题,但当我搜索时,它说要降级setuptools ==19.2,但它在TensorFlow中给了我一个错误,因此任何人都知道要使用tensorflow==2.1.0的setuptools兼容版本

pip version: 19.2

python: 3.7

Windows: 10

以下是我的pip列表:

Package                Version
---------------------- -----------
absl-py                0.9.0
agents                 1.4.0
altgraph               0.17
astor                  0.8.1
astunparse             1.6.3
cachetools             4.1.0
certifi                2020.4.5.1
chardet                3.0.4
click                  7.1.2
cloudpickle            1.3.0
cycler                 0.10.0
dnspython              1.16.0
eventlet               0.25.2
Flask                  1.1.2
future                 0.18.2
gast                   0.2.2
google-auth            1.15.0
google-auth-oauthlib   0.4.1
google-pasta           0.2.0
greenlet               0.4.15
grpcio                 1.29.0
gym                    0.17.2
h5py                   2.10.0
idna                   2.9
importlib-metadata     1.6.0
itsdangerous           1.1.0
Jinja2                 2.11.2
joblib                 0.15.1
Keras-Applications     1.0.8
Keras-Preprocessing    1.1.2
kiwisolver             1.2.0
Markdown               3.2.2
MarkupSafe             1.1.1
matplotlib             3.2.1
monotonic              1.5
netifaces              0.10.6
numpy                  1.18.4
oauthlib               3.1.0
opencv-python          4.2.0.34
opt-einsum             3.2.1
packaging              20.4
pandas                 1.0.3
pefile                 2019.4.18
Pillow                 7.1.2
pip                    19.2
protobuf               3.12.0
pyasn1                 0.4.8
pyasn1-modules         0.2.8
pygame                 1.9.6
pyglet                 1.5.0
PyInstaller            3.6
pymongo                3.8.0
pyparsing              2.4.7
PySide2                5.12.3
python-dateutil        2.8.1
python-dotenv          0.13.0
python-engineio        3.13.0
python-socketio        4.6.0
pytz                   2020.1
pywin32-ctypes         0.2.0
PyYAML                 5.3.1
requests               2.23.0
requests-oauthlib      1.3.0
rsa                    4.0
ruamel.yaml            0.16.10
ruamel.yaml.clib       0.2.0
scikit-learn           0.23.1
scipy                  1.4.1
shiboken2              5.12.3
six                    1.14.0
sklearn                0.0
socketio               0.2.1
tensorboard            2.1.1
tensorboard-plugin-wit 1.6.0.post3
tensorflow-estimator   2.1.0
termcolor              1.1.0
threadpoolctl          2.0.0
tqdm                   4.46.0
urllib3                1.25.9
Werkzeug               1.0.1
wheel                  0.34.2
wrapt                  1.12.1
zipp                   3.1.0


Tags: pipauthpackageistensorflowgoogleruamelpyparsing
1条回答
网友
1楼 · 发布于 2024-05-19 22:26:48

要查找pyparsing包,您需要安装setuptools==19.2 or 20.0

我的tensorflow版本:

gast-0.3.3 tensorboard-2.2.2 tensorflow-2.2.0 tensorflow-estimator-2.2.0 pip: 20.1

只是

pip uninstall tensorflow

然后

pip install tensorflow

执行此操作后,我发现一个错误是我将一个文件命名为copy.py,因此它变得混乱:

https://stackoverflow.com/questions/23418949/pygame-attributeerror-module-object-has-no-attribute-copy

谢谢你的帮助

相关问题 更多 >