Windows系统下,深度学习安装指令

1,升级pip

(1)在prompt中,以管理员权限运行
pip install --upgrade pip
(2)在cmd中,以管理员运行
python -m pip install --upgrade pip

错误:
Script file ‘D:\Users\Administrator\Anaconda3\Scripts\pip-script.py’ is not present.

解决方法:easy_install pip

2,anaconda中添加channel

(1)清华镜像

(D:\Users\Administrator\Anaconda3) C:\Users\Administrator>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

(D:\Users\Administrator\Anaconda3) C:\Users\Administrator>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

(D:\Users\Administrator\Anaconda3) C:\Users\Administrator>conda config --set show_channel_urls yes

(2)中科大镜像


(D:\Users\Administrator\Anaconda3) C:\Users\Administrator>conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/

(D:\Users\Administrator\Anaconda3) C:\Users\Administrator>conda config --set show_channel_urls yes

3,遇到问题ERROR: tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you’ll have setuptools 36.4.0 which is incompatible.

在安装:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.14

解决办法:

pip install tensorboard

注释:最后出了问题:
import tensorboard.lazy as _lazy
AttributeError: module ‘tensorboard’ has no attribute ‘lazy’
解决办法:

pip uninstall tensorboard
pip uninstall tensorflow-gpu

重新装:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.14

现在测试成功:

>>> import tensorflow
>>> from tensorflow.python.client import device_lib
>>> print(device_lib.list_local_devices())
2019-07-21 09:59:39.657281: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-07-21 09:59:39.661258: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
2019-07-21 09:59:40.617377: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
2019-07-21 09:59:40.621751: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-07-21 09:59:40.629822: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-07-21 09:59:41.207582: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-21 09:59:41.210105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]      0
2019-07-21 09:59:41.211590: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0:   N
2019-07-21 09:59:41.220506: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/device:GPU:0 with 3001 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 17227910178020249398
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 3146829004
locality {
  bus_id: 1
  links {
  }
}
incarnation: 13565572337421704331
physical_device_desc: "device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1"
]
>>>

上述结果:环境:win10+cuda10.0+cudnn7.6.1+tensorflow1.14

4 ,遇到:ModuleNotFoundError: No module named ‘skimage’

解决方法:

pip install scikit-image
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值