Python
猎豹的温柔
这个作者很懒,什么都没留下…
展开
-
在linux系统下如何运行.py文件?
背景:在windows系统中编写Python程序代码,想放到Linux系统中运行程序;出现以下问题:一、权限问题:运行程序后,出现-bash: ./test.py: /usr/bin/: bad interpreter: Permission denied,如下图所示:发现:chmod +x test.py之后还是不能解决解决方法:在文件的首行添加:#! /usr/bin/env python3,然后保存退出,即可运行。二、windows系统和Linux系统的换行问题:运行程序后,出现/u原创 2021-08-18 11:37:36 · 5475 阅读 · 0 评论 -
关于使用matplotlib画图出现的图像重叠现象解决方法
来自一个Python新手,CSDN新手的处女作matplotlib画图很方便,但是可能会出现一些意料之外的事情,如图像重叠等。出现这种情况,可以使用plt.subplot_adjust函数进行调整:left : # the left side of the subplots of the figureright : # the right side of the subplots...原创 2019-03-22 11:06:23 · 11582 阅读 · 1 评论