程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

npm one-click installation of Python and node-sass dependencies

編輯:Python

In the process of using vue, which UI framework is always used, when installing these frameworks, it is often necessary to install the required dependencies or related compilation environments. The following will record and describe python and node-How to install sass:

One: python installation:

1.Official websiteDownload the installation package, install it traditionally, and then configure the relevant environment variables

2. On the premise that node is installed but python is installed, install the corresponding version of python through the npm command (recommended method)

npm install --global --production windows-build-tools

For non-python players, it is recommended to install the python environment in the second way. In this way, node will match the python of the corresponding node version for you, which will avoid the compilation failure caused by the version that is too high or too low in subsequent use, such as node16+Compiling under python2.x will throw version problems.

Second: node-sass installation

There are many ways to install node-sass, I will only introduce one here (try many times, this way is the most convenient and stable)

Friends above node 8.x see here:

npm install --save node-sass --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist --sass-binary-site=http://npm.taobao.org/mirrors/node-sass

–registry=https://registry.npm.taobao.org Taobao npm package mirror
–disturl=https://npm.taobao.org/dist Taobao node source code mirror, some binary packages are compiled with
–sass-binary-site=http://npm.taobao.org/mirrors/node-sass This is the node-sass mirror

Friends below node 8.x look here:

1. Install cnpm globally first

npm install -g cnpm --registry=https://registry.npm.taobao.org

2. Use Taobao's npm image to install node-sass

cnpm install node-sass

Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved