zoukankan      html  css  js  c++  java
  • windows 10下的python开发环境

    linux子系统

    1. 按照文档 https://www.jianshu.com/p/2bcf5eca5fbc 的前五步,完成 ubuntu子系统安装。 不需安装图形桌面,无使用价值。
    2. 在https://www.anaconda.com/ 下载最新版的 linux Anaconda3 , 安装到 /opt/anaconda3, 并配置
      sudo echo 'export PATH=/opt/anaconda3/bin:$PATH' >> /etc/bash.bashrc
      
      cat > ~/.condarc <<EOF
      # https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
      channels:
        - defaults
      show_channel_urls: true
      default_channels:
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
      custom_channels:
        conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
      EOF
      
      # https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
      pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
      
    3. 安装tensorflow, 建议用 conda install tensorflow, 而不是用pip。避免numpy在pip环境下被升级,pip版的性能未优化。
    4. 默认运行jupyter lab时,生成的url带有token,不方便。 修改配置如下:
      jupyter notebook --generate-config
      cat >> ~/.jupyter/jupyter_notebook_config.py <<EOF
      c.NotebookApp.token = ''
      c.NotebookApp.disable_check_xsrf = True
      EOF 
      

    VScode

    1. 在https://code.visualstudio.com/docs/?dv=win64 下载vscode, 并学习插件配置。
    2. 为了使用子系统中的python,在vscode中安装下面必备插件。它支持远程 Jupyter server. 注意在命令面板设置: Python: Specify Jupyter server URL.
      • ms-vscode-remote.remote-wsl, 访问子系统
      • ms-python.python, 必备python插件
      • 配置完, 使用如下

    命令行 cmder

    1. 从http://cmder.net/ 中下载安装, 如果系统中没有git, 建议安装完整版,如下

    代码管理 TortoiseGit

    1. 从https://tortoisegit.org/download/ 中, 下载安装

    miniconda3

    1. 下载 https://docs.conda.io/en/latest/miniconda.html 默认安装 C:ProgramDataMiniconda3, 添加系统变量
    2. 以 管理员方式在命令行中, 运行 conda install tensorflow
  • 相关阅读:
    建议使用nullptr而不是NULL
    二叉树的遍历(三种遍历方式,前中后序;递归,栈,迭代实现)
    455.分发饼干Easy Leetcode
    java 报错:Implicit super constructor Point() is undefined. Must explicitly invoke another constructor
    求解字符串所包含子串的个数
    数组去重
    vue watch
    mysql设置指定字段不能为负数
    Shell脚本监控服务存活状态及异常,并触发钉钉webhook报警
    Shell常用语法
  • 原文地址:https://www.cnblogs.com/bregman/p/11876893.html
Copyright © 2011-2022 走看看