ฉันกำลังเรียกใช้รหัสที่ต้องการ pydot และ graphviz ฉันใช้ python 3.5 และ Ubuntu 16.04 LTS 64 บิต
File "/usr/local/lib/python3.5/dist-packages/keras/utils/vis_utils.py", line 17, in _check_pydot
raise ImportError('Failed to import pydot. You must install pydot'
ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
ฉัน googled เล็ก ๆ น้อย ๆ แล้วพบว่าผมสามารถติดตั้ง pydot pip install pydot
มีรหัส แต่ฉันรู้ว่าได้รับข้อผิดพลาดนี้ ฉันเป็น noob ในอูบุนตูและฉันไม่เข้าใจว่าต้องทำอย่างไร ดังนั้นฉันจะติดตั้ง pydot ได้อย่างไร
deeplearning@deep-learning-virtual-machine:~$ pip install pydot
Collecting pydot
Collecting pyparsing>=2.1.4 (from pydot)
Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Installing collected packages: pyparsing, pydot
Found existing installation: pyparsing 2.0.3
Uninstalling pyparsing-2.0.3:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.5/shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/pyparsing.cpython-35.pyc' -> '/tmp/pip-45miiuxw-uninstall/usr/lib/python3/dist-packages/__pycache__/pyparsing.cpython-35.pyc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python3.5/dist-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python3.5/dist-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python3.5/shutil.py", line 553, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/pyparsing.cpython-35.pyc'
pip install pydot>=1.2.4
sudo apt-get install graphviz
และ