环境:MacBook Pro
参考博客
为了动手开发AI代码,我需要安装一个VS code。
开始我以为是安装visual studio呢。我装过visual studio2017。
VS code是一个文本编辑器,有一些插件。安装包只有几十兆大小。

在官网下载VS code,点击扩展,搜索下载python插件和tools for AI,需要中文的同学可以下载中文语言包。下载好了会显示重新加载,点击重新加载,就装好了。
下载安装git,我在桌面上建了个文件夹deeplearning。
cd deeplearning
git clone https://github.com/Microsoft/samples-for-ai/
然后就把ai库克隆到本地了。
我的python版本是3.7,安装失败,在原博下面评论得知需要安装3.5或3.6版本的python。3.7是新的测试的python,可能跟框架不兼容。3.5或3.6则肯定是好使的。
在官网下python3.6.5,下了好几个小时都没下下来,总是断。我打了几个小时游戏。吃饭回来一刷新,再试一次吧。就下好了。要是还没装上,我就去找国内的镜像了。
然后双击安装之类的操作都很常规。
装好了之后进到
samples-for-ai/installer
目录,
python3 install.py。
由于mac自带python2,使用python3 指定使用python3来解释执行python代码.装完了提示有几个库没装上,安装成功。
就算是装好了吧。

截图是tensorflow下的minst示例。缺什么库,vscode会自己用pip命令下载下来。
做实验待续。
分割线
GodlikeGakkideMacBook-Pro:installer godlikegakki$ python3 install.py
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Detecting system information ...
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] OS: Darwin-17.6.0, 64bit
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Python: 3.6.5, 64bit
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] NVIDIA GPU: None
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Git: True
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Begin to install scipy(numpy, scipy) ...
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Begin to pip-install numpy 1.14.3 ...
20:33:28 [INFO] [Microsoft Visual Studio Tools for AI] Begin to install CNTK(BrainScript) ...
20:33:28 [WARNING] [Microsoft Visual Studio Tools for AI] CNTK(BrainScript) is not supported on your OS, we recommend 64-bit Windows-10 OS or 64-bit Linux OS.
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 302, in _error_catcher
yield
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 384, in read
data = self._fp.read(amt)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 307, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
20:39:33 [ERROR] [Microsoft Visual Studio Tools for AI] Fail to pip-install numpy, unexpected error! Please try to run installer script again!
20:39:33 [ERROR] [Microsoft Visual Studio Tools for AI] Pip_install_scipy terminated due to numpy installation failure.
20:39:33 [INFO] [Microsoft Visual Studio Tools for AI] Fail to install numpy 1.14.3. Please try to run installer script again!
20:39:33 [INFO] [Microsoft Visual Studio Tools for AI] Setup finishes.
Press enter to exit.
我与老师对什么是环境装好了产生了分歧。现在我认同老师。库没装完,就是没装好环境。脚本不好使。

VS code MacOS 环境搭建的更多相关文章

  1. Qt For MacOs环境搭建

    使用VMWARE关于macos镜像搭建,参考https://blog.csdn.net/u011415782/article/details/78505422 关于darwin8.5.5 来安装vmt ...

  2. MAC OpenGL 环境搭建

    MAC OpenGL 环境搭建 基础库介绍 先要安装两个库一个是GLEW(OpenGL Extension Wrangler Library),另外一个是GLFW(Graphics Library F ...

  3. Flutter--Flutter开发环境搭建

    一.前言 Flutter 是 Google推出并开源的移动应用开发框架,主打跨平台.高保真.高性能.开发者可以通过 Dart语言开发 App,一套代码同时运行在 iOS 和 Android平台. Fl ...

  4. Redis环境搭建(MacOS)

    Redis是一个开源的key-value类型的存储系统,大部分数据存在于内存中,所有读写速度十分快.其支持的存储value数据类型有多种,如:strings.hashes.lists.sets.sor ...

  5. NDK环境搭建(Native Code的编译,不需要Cygwin)

    分类: android2013-06-21 15:49 475人阅读 评论(0) 收藏 举报 Android NDK 目录(?)[-] System and Software Requirements ...

  6. Apache Cordova开发环境搭建(二)VS Code

    原文:Apache Cordova开发环境搭建(二)VS Code 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u011127019/articl ...

  7. Ionic3开发环境搭建-VS Code

    原文:Ionic3开发环境搭建-VS Code 一.Ionic3在VS Code中的开发环境搭建 1.全局安装Ionic包 npm install -g cordova ionic 使用 ionic ...

  8. python从零开始基础入门——开发环境搭建:Visual Studio Code

    前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者:山海皆可平z PS:如有需要Python学习资料的小伙伴可以加点击下方 ...

  9. MIT6.828准备:MacOS下搭建xv6和risc-v环境

    本文介绍在MacOS下搭建Mit6.828/6.S081 fall2019实验环境的详细过程,包括riscv工具链.qemu和xv6,对于Linux系统同样可以参考. 介绍 只有了解底层原理才能写好上 ...

随机推荐

  1. 再起航,我的学习笔记之JavaScript设计模式07(抽象工厂模式)

    我的学习笔记是根据我的学习情况来定期更新的,预计2-3天更新一章,主要是给大家分享一下,我所学到的知识,如果有什么错误请在评论中指点出来,我一定虚心接受,那么废话不多说开始我们今天的学习分享吧! 前两 ...

  2. python科学计算和可视化学习报告

    一丶numpy和matplotlib学习笔记 1. NumPy是Python语言的一个扩充程序库.支持高级大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库.Numpy内部解除了Pyth ...

  3. 性能测试loadrunner安装

    把杀毒软件关闭 1. 点击 HP_LoadRunner_12.02_Community_Edition_T7177-15059.exe 完成后,点击下一步 接受协议 点击安装 点击完成 TOOLS - ...

  4. C# 获取北京时间 (根据纪元时间(1970/1/1)转换为DateTime)

    根据纪元时间(1970/1/1)转换为DateTime WebClient wc = new WebClient(); s= wc.DownloadString("http://api.ti ...

  5. 20154327 Exp9 Web安全基础

    基础问题回答 (1)SQL注入攻击原理,如何防御 原理: 程序员在编写代码的时候,没有对用户输入数据的合法性进行判断,攻击者利用SQL命令欺骗服务器执行恶意的SQL命令,获得某些他想得知的数据. 防御 ...

  6. 微信小程序的经纬度不想写死,需要转成number类型不能用浮点型

    click: function (e) { var msg = this.data.placeData; var latitude = Number(msg.latitude) var longitu ...

  7. python基础学习1-描述符

    #!/usr/bin/env python # -*- coding:utf-8 -*- #描述符就是将某种特殊类型的类的实例指派给另一个类的属性 #特殊类型指 实现了 # __get__(self, ...

  8. spark-client 一直 accepted,无法提交任务,报错Failed to connect to driver at

    这个问题的原因有几个: 1.客户端安装的机器一般是虚拟机,虚拟机的名称可能是随便搞的,然而,yarn-client模式提交任务,是默认把本机当成driver的.所以导致其他的机器无法通过host的na ...

  9. angularjs 常用方法

    一 angular的copy和extend 1.angular.extend() angular.extend():依次将第二个参数及后续的参数的第一层属性(不管是简单的属性还是对象)拷贝,赋给第一个 ...

  10. Golang 写一个端口扫描器

    前话 最近痴迷于Golang这个新兴语言,因为它是强类型编译型语言,可以直接编译成三大平台的二进制执行文件,可以直接运行无需其他依赖环境.而且Golang独特的goroutine使得多线程任务执行如n ...