ubuntu 系统问题记录

U盘挂载

处理方法如下:
1、Ubuntu 13.10 或以上,安装exfat-fuse:

sudo apt-get install exfat-fuse

2、Ubuntu 13.04 或以下:

sudo apt-add-repository ppa:relan/exfat
sudo apt-get update
sudo apt-get install fuse-exfat

No matching distribution found for py-opencv

(base) wf@ubuntu:~/Downloads$ pip install py-opencv
ERROR: Could not find a version that satisfies the requirement py-opencv (from versions: none)
ERROR: No matching distribution found for py-opencv

(base) wf@ubuntu:~/Downloads$ sudo apt-get update
[sudo] password for wf: 
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]     
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]    
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]  
Fetched 325 kB in 2s (116 kB/s)                             
Reading package lists... Done

(base) wf@ubuntu:~/Downloads$ pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-4.4.0.46-cp36-cp36m-manylinux2014_x86_64.whl (49.5 MB)
     |████████████████████████████████| 49.5 MB 9.7 MB/s 
Requirement already satisfied: numpy>=1.13.3 in /home/wf/anaconda3/lib/python3.6/site-packages (from opencv-python) (1.14.3)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.4.0.46

验证:

(base) wf@ubuntu:~/Downloads$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2

torch.load with map_location=‘cpu’

 raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.

出错语句:

saved_state_dict = torch.load(args.restore_from)

改成:

# saved_state_dict = torch.load(args.restore_from)
saved_state_dict = torch.load(args.restore_from, map_location='cpu')
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值