随笔分类 - python
摘要:下载: https://www.python.org/ftp/python/3.7.4/ .tgz文件,解压后,进入该文件夹 编译./configuremakesudo make install 当 sudo make install 时:报错ModuleNotFoundError: No modu
        阅读全文
            
摘要:https://www.python.org/ftp/python/ https://www.cnblogs.com/linxue/p/10097785.html https://blog.csdn.net/timtian008/article/details/81186356 https://bl
        阅读全文
            
摘要:https://github.com/robinhood/faust
        阅读全文
            
摘要:subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1. 解决方法find / -name lsb_releaserm -rf /usr/bin/lsb_releas
        阅读全文
            
摘要:下载源码:https://www.python.org/downloads/release/python-373/ 一、先安装需要的包zlib1g,libffisudo apt-get update sudo apt-get install zlib1g-dev sudo apt-get insta
        阅读全文
            
摘要:a.py test.sh 输出 test.sh 输出 参考: http://ju.outofmemory.cn/entry/62675https://zhidao.baidu.com/question/391954555815798765.htmlhttps://www.cnblogs.com/ka
        阅读全文
            
摘要:test.py 输出 参考/: https://www.runoob.com/python/python-files-io.htmlhttps://www.cnblogs.com/bigberg/p/6430095.htmlhttps://www.runoob.com/python3/python3
        阅读全文
            
摘要:test.pyclass sss:	def ddd(self): print("hello") test2.pyfrom testone import sss
        阅读全文
            
摘要:import os import sys print(sys.argv) bogon:Desktop macname$ python3 test2.py deesws.json dede.json swswsw.json ['test2.py', 'deesws.json', 'dede.json', 'swswsw.json']
        阅读全文
            
摘要:>>> import os>>> os.path.join('/hello/','good/boy/','doiido')>>>'/hello/good/boy/doiido' 参考:https://blog.csdn.net/fu6543210/article/details/80032895
        阅读全文
            
摘要:os.remove():删除指定文件 os.rmdir():删除指定目录 os.mkdir():创建单级目录 os.makedirs():创建多级目录 os.listdir(dirname):列出dirname下的目录和文件 os.getcwd():获得当前工作目录 os.curdir:返回当前目录('.') os.chdir(dirname):改变工作目录到dirname os.path....
        阅读全文
            
摘要:import os print(os.getcwd()) print("/".join(os.path.dirname(os.path.abspath(__file__)).split("/"))) bogon:testdir macname$pwd /Users/macname/Desktop/testdir bogon:testdir macname$ python3 ../test2.py 
        阅读全文
            
摘要:如果已经安装好pip3,那么执行命令安装virtualenv环境 安装完成检测版本是否安装成功 创建新目录 创建一个独立的Python运行环境,命名为venv,参数--no-site-packages,表示已经安装到系统Python环境中的所有第三方包都不会复制过来,这样,我们就得到了一个不带任何第
        阅读全文
            
摘要:update-alternatives命令可以修改系统默认命令的软链指向,参考这里,上面两句指令就是修改了系统默认的/usr/bin/python3 的软链指向,指向了两个位置,最后面的1和2是优先级。 通过以下命令,可以切换Python3的指向 参考: https://blog.csdn.net/
        阅读全文
            
摘要:解决: 升级到python3.6
        阅读全文
            
摘要:import os filename = r'/home/tim/workspace/test.txt'if os.path.exists(filename): message = 'OK, the "%s" file exists.'else: message = "Sorry, I cannot
        阅读全文
            
摘要:>>> import os>>> os.path.exists('d:/assist')True>>> os.path.exists('d:/assist/getTeacherList.py')True>>> os.path.isfile('d:/assist')False>>> os.path.i
        阅读全文
            
摘要:tester.py: 输出 参考: https://www.cnblogs.com/royfans/p/7908009.html
        阅读全文
            
摘要:#参考:#https://www.runoob.com/python3/python3-smtp.html#https://www.runoob.com/python/python-email.html阿里云 smtp 服务配置https://help.aliyun.com/knowledge_de
        阅读全文
            
摘要:生成requirements.txt文件pip freeze > requirements.txt 安装requirements.txt依赖pip install -r requirements.txt 参考:https://www.cnblogs.com/zelos/p/7439599.htmlh
        阅读全文
            
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号