首页 > 编程语言 > 详细

windows 10下的python开发环境

时间:2019-11-17 17:10:17      阅读:88      评论:0      收藏:0      [点我收藏+]

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/ 中, 下载安装

windows 10下的python开发环境

原文:https://www.cnblogs.com/bregman/p/11876893.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!