python
walker_bin
这个作者很懒,什么都没留下…
展开
-
conda环境下pip安装tar.gz格式的离线资源包
###需求:在conda虚拟环境下安装opencvpip install opencv-contrib-python安装失败,原因:下载安装包失败pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple安装失败,原因:下载安装包失败###解决办法:离线安装下载安装包:复制网址https://pypi.tuna.tsinghua.edu.cn/packages/42/02/7b2fb0b81266aa3原创 2021-03-26 15:17:51 · 4404 阅读 · 0 评论 -
python opencv从视频中保存特定帧的图像
# -*- coding=utf-8 -*-import cv2import argparseimport os# cam = 'rtsp://username:passwd@192.168.2.170:554/11'# cam = 'test.mp4'def basic_options(): parser = argparse.ArgumentParser() p...原创 2020-04-22 19:59:43 · 2794 阅读 · 0 评论 -
pycharm找不到libcudart.so.10.0
问题pycharm远程连接开发服务器上的conda环境,在pycharm上run使用mxnet的代码时提示:OSError: libcudart.so.10.0: cannot open shared object file: No such file or directory但是,直接在服务器上对应conda环境中运行代码可以通过解决在服务器的终端上执行:sudo ldco...原创 2020-03-31 14:59:09 · 364 阅读 · 0 评论 -
conda正确安装mxnet
错误安装:pip install mxnet报错terminate called after throwing an instance of 'dmlc::Error' what(): [13:18:13] src/storage/storage.cc:119: Compile with USE_CUDA=1 to enable GPU usageStack trace: [b...原创 2020-03-31 14:08:42 · 2674 阅读 · 0 评论 -
配置支持GPU的docker环境、在docker容器中搭建python环境
安装docker和nvidia-dockerdocker安装https://www.runoob.com/docker/ubuntu-docker-install.html验证:docker run hello-worldnvidia-docker安装https://github.com/NVIDIA/nvidia-docker验证:docker run --gpus all nvidia...原创 2020-03-07 17:01:13 · 482 阅读 · 0 评论 -
Anaconda常用指令
创建环境:conda create -n rcnn python=3.6删除环境:conda remove -n rcnn --all重命名环境:conda create -n tf --clone rcnn && conda remove -n rcnn --all查看环境:conda info -e或者conda env list...原创 2020-03-06 11:44:01 · 88 阅读 · 0 评论 -
conda启动、退出、切换环境时自动执行脚本(转载)
在使用conda管理多种p...转载 2020-02-26 17:33:22 · 4998 阅读 · 0 评论 -
python比较两个list
方法1:自己写的,耗时很长。当两个list是100000级别的数据时,需要好几分钟list1 = filelist(options.inputpath, filefeat='.jpg')list2 = filelist(options.outputpath, filefeat='.jpg')list3 = []for jpg in list1: if jpg not in lis...原创 2020-01-16 13:36:26 · 626 阅读 · 0 评论 -
python检索文件并保存
import osdef filelist(dir, subdir=None, filefeat=None): ''' 检索指定文件夹下的文件列表 :param dir: 检索起始根路径 :param subdir: 检索的根路径下的二级路径,默认为None :type subdir: list :param filefeat: 检索的文件的特...原创 2020-01-15 19:41:24 · 346 阅读 · 0 评论 -
git error:‘The requested URL returned error: 500‘
拉取/提交代码的时候遇到500错误码$ git pushfatal: unable to access 'http://192.168.2.193:65016/xxxxx/xxxxx/': The requested URL returned error: 500原因:设置了代理解决:在终端运行unset http_proxyunset https_proxygit push...原创 2020-01-14 11:46:50 · 21409 阅读 · 3 评论 -
python写文件是否覆盖原来内容
python写文件是否覆盖原来内容python写文件覆盖原来内容不覆盖原来内容python写文件python写文件的两种方式:覆盖、不覆盖原来内容覆盖原来内容txt = ‘landmark.txt’wrf = open(txt, ‘w’)wrf.write(‘test01’ + ‘\n’)wrf.close()txt = ‘landmark.txt’wrf = open(txt,...原创 2020-01-12 13:39:26 · 7237 阅读 · 0 评论