简体   繁体   English

在Mac上安装Java时找不到pkg_resources

[英]pkg_resources not found while installing java on Mac

Traceback (most recent call last): File "/usr/bin/xattr-2.7", line 7, in <module> from pkg_resources import load_entry_point ImportError: No module named pkg_resources

My PYTHONPATH contains /usr/local/lib/python3.7/site-packages , the site-packages folder indeed contains the pkg_resources folder. 我的PYTHONPATH包含/usr/local/lib/python3.7/site-packages文件夹确实包含pkg_resources文件夹。 I tried everything and have spent hours searching stack overflow. 我尝试了一切,并花了几个小时搜索堆栈溢出。 I even reinstalled python and setuptools, but nothing seems to work. 我什至重新安装了python和setuptools,但似乎没有任何效果。

The command I am using to install Java - brew cask install java 我用来安装Java的命令brew cask install java

I guess I was so lost trying to install it with brew , that I forgot that I could download the dmg file from the Oracle website and install it. 我想我尝试用brew安装它实在太迷茫了,以至于我忘了可以从Oracle网站下载dmg文件并安装它。 I still can't figure out the issue with pkg_resources though. 我仍然不知道pkg_resources的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM