环境: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. JSONP - 从理论到实践

    同源策略 ajax之所以需要“跨域”,罪魁祸首就是浏览器的同源策略.即,一个页面的ajax只能获取这个页面相同源或者相同域的数据. 如何叫“同源”或者“同域”呢?——协议.域名.端口号都必须相同.例如 ...

  2. Service 服务发现的两种方式-通过案例来理解+服务外部访问类型+selector-label

    1.环境变量 在创建一个Pod时,kubelet在该Pod的所有容器中为当前所有Service添加一系列环境变量. 例如,已存在名称为“redis-master”的Service,它对外暴露6379的 ...

  3. Scrapy-从数据库取出IP并判断是否可用

    import pymysql import requests conn = pymysql.connect(host="localhost",user="root&quo ...

  4. 数据结构与算法之Stack(栈)的应用——in dart

    参考教科书上的一个应用例子,用栈来分析一行输入中的括号brackets是否匹配.用stdin读取用户输入,并输出检查结果.exit 退出. 注意这行代码: import 'stack.dart';// ...

  5. WPF触控方面的技术点

    一.基本的触控事件(原始触控) 二.复杂触控事件(操作)

  6. vba 语法

    VBA语言基础 第一节 标识符 一.定义 标识符是一种标识变量.常量.过程.函数.类等语言构成单位的符号,利用它可以完成对变量.常量.过程.函数.类等的引用. 二.命名规则 1) 字母打头,由字母.数 ...

  7. 【LG3240】[HNOI2015]实验比较

    题面 洛谷 题解 30pts 爆搜即可. 100pts 题意描述里有一句:"对每张图片\(i\),小\(D\)都最多只记住了某一张质量不比\(i\)差的另一张图片\(K_i\)." ...

  8. JAVAMAIL 530 Error: A secure connection is requiered(such as ssl)

    原因:代码没有开启ssl传输 添加:  props.put("mail.smtp.ssl.enable", "true");           // 设置是否 ...

  9. Linux 挂载 xshell 命令 配置环境变量

  10. Python无参装饰器

    需求:想要在test_func函数前后执行一些代码   1.第一步(定义函数,将调用原函数,使用新函数替换) def test_func(): return 'test_func' def test_ ...