Home >Web Front-end >JS Tutorial >A brief discussion on the solution to the problem of too low version of nodejs installed by conda

A brief discussion on the solution to the problem of too low version of nodejs installed by conda

青灯夜游
青灯夜游forward
2021-04-01 10:09:315218browse

This article will introduce to you how to solve the problem of too low version in conda installation nodejs. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

A brief discussion on the solution to the problem of too low version of nodejs installed by conda

Related recommendations: "nodejs Tutorial"

When using jupyterlab to try to install a new labextension, the installation nodejs version error occurred. Many extension modules have been unable to be installed or failed to install. The author has found various solutions, as follows:

  • Method 1: Deploy Anaconda and JupyterLab on the server

  • Method 2: Delete the package and then install it

  • Method 3: Jupytelab How to install labextension

  • Method 4: Through npm Install nodejs
  • Method 5: The civet cat changes to the prince - as shown below:

    A brief discussion on the solution to the problem of too low version of nodejs installed by conda

.
.
.

The result... doesn’t work. Of course, you can also try the above methods, maybe which one will work for you.

Cause analysis

Later I found out: labextension requires nodejs version 10.0 or above to install the extension plug-in! !!
The author found by querying various nodejs versions in his own environment that most versions

1. nodejs --version   # v14.4.1 这个是通过方法四安装的
2. pip list                  # v0.1.1 这个是通过pip安装的
3. conda list             # v4.6.5 这个是通过conda安转的

Although nodejs installed through npm exceeds v10.0, in the jupyterlab environment It cannot be used (if you find something that can be used, please communicate with me). I found that there were too many installed versions, so I simply uninstalled the nodejs installed by pip conda, and then found a way to install a nodejs version exceeding v10.0.

Solution

Specify the installation version, you can install it through the following command:

Method 1 You can first try to search Check the nodejs version:

conda search nodejs # 搜索conda下的nodejs版本。
conda install nodejs=14.7.0 -c conda-forge

Method 2. conda search nodejs -c conda-forge #Search for the nodejs version under conda-forge.

Or directly enter conda-forge under anaconda official website Search the repo you want

conda install -c conda-forge/label/cf202003 nodejs

Select one of the above methods

For more programming-related knowledge, please visit: Programming video! !

The above is the detailed content of A brief discussion on the solution to the problem of too low version of nodejs installed by conda. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete