TensorFlow安装:windows篇
主要步骤:
1nodejs安装
2yarn安装
3parcel安装
一、nodejs安装:
网址:https://nodejs.org/en/download/
二、yarn安装:
网址:https://yarnpkg.com/zh-Hans/docs/install#windows-stable
三、parcel安装:
网址:http://www.css88.com/doc/parcel/getting_started.html
1、首先使用 yarn安装 Parcel :
yarn global add parcel-bundler
2、使用以下命令在你的项目目录中(如:c:/tensorflow.js)创建一个 package.json
文件:
yarn init -y
3、入门实例:
在你的项目目录中(如:c:/tensorflow.js)创建一个 index.html
和 index.js
文件。
index.html:
<html>
<body>
<script src="./index.js"></script>
</body>
</html>
index.js:
console.log("hello world");
在命令行中输入:
parcel index.html
在浏览器中打开 http://localhost:1234/ ,调用开发者工具查看console(控制台)。
你也可以使用 -p <port number>
选项覆盖默认端口。