zoukankan      html  css  js  c++  java
  • pytorch安装

    环境:ubuntu16.04

    (1) install python3

    16.04 里面默认安装了python2.7 和3.5

    sudo update-alternatives –install /usr/bin/python python /usr/bin/python2 100

    sudo update-alternatives –install /usr/bin/python python /usr/bin/python3 150 

    如果想要改回Python2 执行如下命令 
    sudo update-alternatives –config python 
    按照提示输入选择数字回车即可。 

    (2) install pip3

    sudo apt-get install python3-pip

    如果报错"Unable to locate package python3-pip"

    前面加一行:

    sudo apt-get update

    (3) install numpy, scipy, matplotlib

    pip3 install numpy

    pip3 install scipy

    pip3 install matplotlib

    (4) install pytorch

    pip3 install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl 
    pip3 install torchvision

    RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
        
    Please follow the instructions at http://pytorch.org/ to install with miniconda instead.

    (5) anaconda pytorch

     1. 去anaconda官网下载安装包,注意和机器上的python版本保持一致,不然安装annaconda过程中会报错。

    python3.5 对应的版本号为anaconda3 4.2.0

    2. bash ana*.sh

    3. 没有独立显卡,anaconda安装,python3.5

    命令:conda install pytorch torchvision -c soumith

  • 相关阅读:
    nyoj_216_A problem is easy_201312051117
    nyoj_676_小明的求助_201312042142-2
    C# 堆和栈的区别?
    DataReader和DataSet区别
    SQLSERVER2008R2正确使用索引
    SQL Profiler工具简介
    (转)非常完善的Log4net详细说明
    SQL语句优化技术分析
    HashTable、HashSet和Dictionary的区别
    使用Nuget发布自己的类库包
  • 原文地址:https://www.cnblogs.com/shadowwalker9/p/7624356.html
Copyright © 2011-2022 走看看