python常见问题记录 jupyter

使用 pip install 安装时:

  • 如果有--user参数时,则安装到:UserslibinAppDataRoamingPythonPython36site-packages
  • 如果没有--user参数,则安装到C:UserslibinAppDataLocalProgramsPythonPython36Libsite-packages下。
  • 前者没有在环境变量下,且实际上并不看重用户的区分,故没有必要用--user参数。

jupyter

  • 两行代码,渲染出矢量图:
1
2
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
  • 保存pdf矢量图:
1
2
plt.savefig('tmp.pdf', bbox_inches='tight')
plt.show()