Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js - Do I really need Visual Studio ? And Python 2.X or 3.X?

trying to install websockets on windows Node.js.

I am getting native extensions require Visual Studio and Python.

My question is : Is it possible to take another compiler? Or do I really need VS (3,6GB) Download or are there alternatives, since I don´t want to download that huge amount. Linux has GGC , I suppose. And do I need Python 2.X or Python 3.X.

Node.js

Thanks for the replies. Have a nice day.

like image 930
zer02 Avatar asked Sep 14 '12 13:09

zer02


People also ask

What version of Python does node need?

node-gyp requires that you have installed a compatible version of Python, one of: v3. 7, v3. 8, v3. 9, or v3.

Do you need Visual Studio for Python?

In Visual Studio 2019, you can run and debug code without having a Visual Studio project file. See Quickstart: Open and run Python code in a folder-2019 for an example. In Visual Studio 2022, you can run and debug code without having a Visual Studio project file.

Do we need Python for npm install?

NPM has a package called windows-build-tools that should automatically install everything you need to get node-gyp working, including the Microsoft build tools, compilers, Python, and everything else required to build native Node modules on Windows.

Can we use Python and Node.js together?

js and Python finding out that Node. js is awesome for Web Development and Python for Data Sciences. Actually, we don't need to always stick with the same programming language as there are ways to use them both together. In this article, I will show you an example of how to use a Python script from the Node.


1 Answers

You'll need visual studio in order to get the C++ compilers. You can pull down Visual Studio 2010 Express here, which is a much smaller download (694MB). For python, you'll need 2.6 or 2.7 as described on the node.js wiki on github.

Another alternate is to simply use the binaries already supplied by the node.js team. If you go this route, you won't have to compile the source yourself. From what I can tell, node should already support websockets. See a tutorial on how to set up a server using websockets here.

like image 133
Jduv Avatar answered Sep 28 '22 08:09

Jduv