新环境下,pycharm安装python3.6
linux里的代码 pip3 下载的路径:/home/lin7u/.local/lib/python3.5/site-packages
模糊查找文件:find /路径 -name " 名字* " -type d
Mac:
shift + fn + option + 回车键
pycharm安装 库 :
tensorflow:https://www.gsm-guard.net/install/pip (官方网)
我们这里利用pip3安装tensorflow,包源调用的是清华的源(没有翻墙,外网速度太慢emmm)
sudo pip3 install -i https://www.gsm-guard.net/simple/ https://www.gsm-guard.net/tensorflow/linux/cpu/tensorflow-1.7.0-cp35-cp35m-linux_x86_64.whl
注意:执行程序会有warning,因为numpy版本过高
解决办法: 先卸载numpy,再安装比较低的版本
sudo pip3 uninstall numpy
sudo python3 -m pip install -i https://www.gsm-guard.net/simple numpy==1.15.0
TensorFlow please use urllib or similar directly错误。
TensorFlow实现mnist书写数字分类,出现please use urllib or similar directly错误。
安装 scikit-learn 包:(大费周章,其实很简单)
前置包:你要下载 scikit-learn,首先安装成功了 numpy和scipy
如果要直接 pip install 这个包,就是死路一条,头撞的血肉模糊也下不下来。不要看网上乱七八糟的写的,亲测撞头!!
最直接最简单的方法:
去官网上下载whl文件,要相信官网!一定要先想到官网!
网址:https://www.gsm-guard.net/project/scikit-learn/#modal-close
根据自己的系统下载合适的版本,其中:x86_64 是64位系统版本
然后安装:pip3 install whl文件名称
成功!结束!
安装numpy库(是个关联库):
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
Pycharm 下载库太慢,以至于超时:
出现:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘www.gsm-guard.net’, port=443): Read timed out.
解决:换下载源
解决PyCharm下载Python第三方库时速度慢的问题
【Linux教程】Ubuntu Linux 更换源教程
清华源:https://www.gsm-guard.net/simple
安装pytorch官网列表
https://www.gsm-guard.net/whl/torch_stable.html
安装 pycocotools
ubuntu16.04 pycocotools安装
网页之后的补充:(不然还是会报错)
make之后,执行pip install pycocotools
Ubuntu16 安装cocoapi中的x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: No such file or directory 问题
关于command ‘gcc’ failed with exit status 1 解决方法
bug:报错ImportError: No module named pycocotools.coco:参考价值不大,可参考
GPU
Ubuntu16.04安装NVIDIA驱动、实现GPU加速
安装cuda
Ubuntu16.04下安装cuda和cudnn的三种方法(亲测全部有效)
寻找合适的驱动版本
解决RuntimeError: cuda runtime error (30) : unknown error at /pytorch/aten/src/THC/THCGeneral.cpp:70&N…