如何修复错误:使用pip安装tensorflow_recommenders时,命令错误退出状态为1:

时间:2020-10-07 06:46:29

标签: python tensorflow pip tensorflow-lite

我正在尝试使用pip安装tensorflow-commenders,但我一直收到此错误。

我确保已经安装并升级了Tensorflow 2.x,但是在运行以下命令后,我仍然收到相同的错误:

pip install tensorflow-recommenders

错误:

     command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wy/j6rljpj50y326hn2s45p1svc0000gn/T/pip-install-94eA0b/tensorflow-recommenders/setup.py'"'"'; __file__='"'"'/private/var/folders/wy/j6rljpj50y326hn2s45p1svc0000gn/T/pip-install-94eA0b/tensorflow-recommenders/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wy/j6rljpj50y326hn2s45p1svc0000gn/T/pip-pip-egg-info-n6vhs1
         cwd: /private/var/folders/wy/j6rljpj50y326hn2s45p1svc0000gn/T/pip-install-94eA0b/tensorflow-recommenders/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/wy/j6rljpj50y326hn2s45p1svc0000gn/T/pip-install-94eA0b/tensorflow-recommenders/setup.py", line 17, in <module>
        import pathlib
    ImportError: No module named pathlib
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我已尽力而为,所以如果有人有任何建议,那将非常有帮助!

0 个答案:

没有答案