Install nodeJS inside conda environment

[亡魂溺海] 提交于 2020-01-02 00:54:30

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/51557141/install-nodejs-inside-conda-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!