1

相关代码:hist.render_to_file('1.svg')

这张图片显示了细节

在此处输入图像描述

我尝试安装新版本的lxml,但无法工作;

我安装它的过程是这样的:

apt-get install libxml2-dev libxslt-dev python-dev
pip install lxml

谁能告诉我如何解决它?

谢谢!

后来我按照评论说的那样尝试解决它,这就是结果。

怎么升级?我升级失败了...

davenny@davenny-X555LF:~$ pip install --upgrade pygal
Collecting pygal
  Downloading pygal-2.4.0-py2.py3-none-any.whl (127kB)
    100% |████████████████████████████████| 133kB 38kB/s 
Installing collected packages: pygal
  Found existing installation: pygal 1.7.0
    Uninstalling pygal-1.7.0:
      Successfully uninstalled pygal-1.7.0
  Rolling back uninstall of pygal
Exception:
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 784, in install
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/usr/local/lib/python3.5/dist-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/pygal-2.4.0.dist-info'
davenny@davenny-X555LF:~$ pip list --outdated
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.


matplotlib (1.5.2rc2) - Latest: 2.0.2 [wheel]
pygal (1.7.0) - Latest: 2.4.0 [wheel]
python-dateutil (2.4.2) - Latest: 2.6.1 [wheel]

4

0 回答 0