Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install nodeJS inside conda environment

I want to use NodeJS and AngularJS for a small project.

Can I use conda's virtualenv to install these packages inside a separate virtual environment, and then have them removed from the system once I delete the virtualenv?

like image 498
Fakher Mokadem Avatar asked Jul 27 '18 11:07

Fakher Mokadem


People also ask

Does Anaconda have node JS?

Anaconda not only installs Jupyter and its requirements, but also a selection of frequently-used Python packages. Node. js provides a Windows installer.

Can I install node with homebrew?

With Homebrew, you can have multiple major versions of Node. js and npm installed at a time, but only one can be active. If you want to switch between them, you have to "unlink" the actively linked version and "link" the one you want to use.

What does Conda forge do?

What is conda-forge? ¶ conda-forge is a community effort and a GitHub organization which contains repositories of conda recipes and thus provides conda packages for a wide range of software. The built distributions are uploaded to anaconda.org/conda-forge and can be installed with conda.


1 Answers

You can for sure use conda to create virtual environments for nodejs programs.

$ conda create -yn myapp nodejs $ conda activate myapp $ node --version v8.11.3 $ npm --version 5.6.0 

And then in the environment myapp, you can do all of your app development and once you are done, removal is also easy:

$ conda env remove -yn myapp 

Instead of environments, you can also use prefixes. Like:

$ conda create -yp ./myapp nodejs $ conda activate ./myapp $ node --version v8.11.3 $ npm --version 5.6.0 

And once you are done, just delete it.

$ conda env remove -yp ./myapp 

OR

$ rm -fr ./myapp 
like image 120
Nehal J Wani Avatar answered Sep 18 '22 13:09

Nehal J Wani