VS code MacOS 环境搭建
环境: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 环境搭建的更多相关文章
- Qt For MacOs环境搭建
使用VMWARE关于macos镜像搭建,参考https://blog.csdn.net/u011415782/article/details/78505422 关于darwin8.5.5 来安装vmt ...
- MAC OpenGL 环境搭建
MAC OpenGL 环境搭建 基础库介绍 先要安装两个库一个是GLEW(OpenGL Extension Wrangler Library),另外一个是GLFW(Graphics Library F ...
- Flutter--Flutter开发环境搭建
一.前言 Flutter 是 Google推出并开源的移动应用开发框架,主打跨平台.高保真.高性能.开发者可以通过 Dart语言开发 App,一套代码同时运行在 iOS 和 Android平台. Fl ...
- Redis环境搭建(MacOS)
Redis是一个开源的key-value类型的存储系统,大部分数据存在于内存中,所有读写速度十分快.其支持的存储value数据类型有多种,如:strings.hashes.lists.sets.sor ...
- NDK环境搭建(Native Code的编译,不需要Cygwin)
分类: android2013-06-21 15:49 475人阅读 评论(0) 收藏 举报 Android NDK 目录(?)[-] System and Software Requirements ...
- Apache Cordova开发环境搭建(二)VS Code
原文:Apache Cordova开发环境搭建(二)VS Code 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u011127019/articl ...
- Ionic3开发环境搭建-VS Code
原文:Ionic3开发环境搭建-VS Code 一.Ionic3在VS Code中的开发环境搭建 1.全局安装Ionic包 npm install -g cordova ionic 使用 ionic ...
- python从零开始基础入门——开发环境搭建:Visual Studio Code
前言 文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者:山海皆可平z PS:如有需要Python学习资料的小伙伴可以加点击下方 ...
- MIT6.828准备:MacOS下搭建xv6和risc-v环境
本文介绍在MacOS下搭建Mit6.828/6.S081 fall2019实验环境的详细过程,包括riscv工具链.qemu和xv6,对于Linux系统同样可以参考. 介绍 只有了解底层原理才能写好上 ...
随机推荐
- 使用Python编写简单网络爬虫抓取视频下载资源
我第一次接触爬虫这东西是在今年的5月份,当时写了一个博客搜索引擎.所用到的爬虫也挺智能的,起码比电影来了这个站用到的爬虫水平高多了! 回到用Python写爬虫的话题. Python一直是我主要使用的脚 ...
- 【VSC】我安装了哪些扩展插件
Nodejs gitk —— 版本实时比对 Debugger for Chrome —— 让 vscode 映射 chrome 的 debug功能,静态页面都可以用 vscode 来打断点调试. ...
- html5的拖拽事件
原生拖放 一.若要一个元素可以被拖放,首先要为元素添加draggable属性 true 可以被拖放 false 不可以被拖放 auto 除img或url以外都可以被拖放 其他值 都不可以被拖放 注释: ...
- vue的采坑之旅--vue-cli脚手架loader重复--Invalid CSS after "...load the styles": expected 1 selector or at-rule
在使用scss是可能会添加loader,例如 { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], } 然而当使 ...
- php对接网易云信视频直播
<?php/** * Created by PhpStorm. * User: lhl * Date: 2019/4/10 * Time: 17:31 */ namespace app\api\ ...
- django中间件-12
目录 自定义中间件 函数定义 类定义 中间件的执行顺序 在django中,中间件其实就是一个类,他是一个可以介入django的 request 和 response 的钩子框架,在请求响应不同的阶段, ...
- scala集合与java集合的转换应用
今天在业务开发中遇到需要Scala集合转为Java集合的场景: 因为业务全部是由Scala开发,但是也避免不了调用Java方法的场景,所以将此记录下来加深记忆: import scala.collec ...
- telerik WinForm主题切换
通过按钮或Form_Load中切换: ThemeResolutionService.ApplicationThemeName = "Windows 7"; //具体的主题名,不同的 ...
- AGC 030 B - Tree Burning
B - Tree Burning 链接 题意: 一个长度为L的环,有n个位置上有树,从0出发,每次选择一个方向(顺时针或者逆时针),一直走,直到走到一棵树的位置,烧掉这棵树,重复这个过程,直到没有树. ...
- BZOJ 2818 GCD 素数筛+欧拉函数+前缀和
题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=2818 题意:给定整数N,求1<=x,y<=n且Gcd(x,y)为素数的数对( ...