![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
广慕君
勿在浮沙筑高台
展开
-
用pip安装GDAL时出错
原因:GDAL不是纯净的python库,无法像pip install flask这样安装库文件。解决方法:查看安装信息命令行中输入 python ,回车后即可查看已安装系统的位数和Python的版本如图,我的是64位系统,python3.6 下载GDAL安装文件下载网址: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal根据步骤1中的...原创 2018-10-29 16:44:37 · 5828 阅读 · 1 评论 -
Pyinstaller将Python程序打包成EXE(多种模式的打包)
Pyinstaller将Python程序打包成EXE文章目录Pyinstaller将Python程序打包成EXE安装整体流程参数说明单一PY文件包含数据文件多个PY文件多进程打包问题记录参考安装pip install pyinstaller整体流程pyi-makespec xxx.py # 先生成spec文件pyinstaller xxx.spec # 再生成exe文件...原创 2019-07-06 10:49:15 · 704 阅读 · 0 评论 -
从国内的源使用pip安装库,提高安装速度
使用命令参考如下pip install xxx -i https://xxxx例如使用清华大学的源(https://pypi.tuna.tsinghua.edu.cn/simple) 安装pandas库pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple国内的源:清华大学:https://pypi.tuna.ts...原创 2019-02-12 15:21:01 · 307 阅读 · 0 评论 -
Linux系统安装python3和创建python3虚拟环境
Python3安装参考https://www.cnblogs.com/kimyeee/p/7250560.html按照步骤安装完成后,进入虚拟环境,pip install xxx ,安装某个第三方库测试一下是否成功,如果报错与TLS/SSL相关,参考文章最后的操作。创建Python3虚拟环境使用python3解释器,创建虚拟环境virtualenv -p /usr/bin/pyth...原创 2019-02-07 12:08:19 · 1574 阅读 · 0 评论 -
python中os.listdir()的使用和文件批量重命名方法
作用返回指定文件夹路径下的文件名称列表用法path_name = './image' #文件夹路径files = os.listdir(path_name) #路径下的文件名称列表注意返回的files列表中,文件是乱序放置的排序在上述代码后,加上files.sort(key=lambda x:int(x[:-4]))上述代码意思是:对于文件名称,按照从右往左数第四...原创 2019-02-07 12:01:40 · 856 阅读 · 0 评论 -
python中打印zip()函数结果和zip()函数的使用
在python 3.0中zip()是可迭代对象,使用时必须将其包含在一个list中,方便一次性显示出所有结果。>>> t = ['a','b','c']>>> m = [5,4,9]>>> zip(t,m)<zip object at 0x0000014A7734FB08>>>> list(zip(t,m原创 2018-11-01 21:54:31 · 7960 阅读 · 0 评论 -
sklearn中cross_validation包无法使用
情况描述:想要从sklean.cross_validation中引入train_test_split,代码运行后出现一下问题提示不存在sklean.cross_validation模块解决方法:从sklearn.model_selection引入train_test_split即可...原创 2018-11-01 21:45:51 · 34158 阅读 · 2 评论 -
python pandas.DataFrame选取、修改数据
文章转载自: https://blog.csdn.net/AlanGuoo/article/details/52331901 相信很多人像我一样在学习python,pandas过程中对数据的选取和修改有很大的困惑(也许是深受Matlab)的影响。。。到今天终于完全搞清楚了!!!先手工生出一个数据框吧import numpy as npimport pandas as pddf...转载 2018-11-01 14:05:00 · 6331 阅读 · 0 评论 -
pandas中to_csv()和read_csv()参数详解
pandas.read_csv参数整理 读取CSV(逗号分割)文件到DataFrame也支持文件的部分导入和选择迭代更多帮助参见:http://pandas.pydata.org/pandas-docs/stable/io.html参数:filepath_or_buffer : str,pathlib。str, pathlib.Path, py._path.loc...转载 2018-11-01 13:59:20 · 4871 阅读 · 0 评论 -
pyinstaller打包python程序的常见问题
使用pyinstaller打包python程序时遇到的问题记录,问题已全部解决。解决方法详见 https://guangmujun.cn/archives/168shapely库相关问题:Unable to find "e:\github\forexe\venv\lib\site-packages\shapely\DLLs\geos.dll" when adding binary ...原创 2019-08-22 10:35:38 · 2714 阅读 · 0 评论