laravel vue 프로젝트에서 npm 설치를 수행할 수 없습니다
P粉566048790
P粉566048790 2023-08-30 18:30:39
0
1
413
<p>我正在为我的 <strong>laravel vue 项目</strong>执行<strong>npm install</strong>。但 npm install 显示以下错误:</p> <pre class="brush:php;toolbar:false;">gyp verb find Python Python is not set from command line or npm configuration gyp verb find Python Python is not set from environment variable PYTHON gyp verb find Python checking if &quot;python3&quot; can be used gyp verb find Python - executing &quot;python3&quot; to get executable path gyp verb find Python - &quot;python3&quot; is not in PATH or produced an error gyp verb find Python checking if &quot;python&quot; can be used gyp verb find Python - executing &quot;python&quot; to get executable path gyp verb find Python - &quot;python&quot; is not in PATH or produced an error gyp verb find Python checking if &quot;python2&quot; can be used gyp verb find Python - executing &quot;python2&quot; to get executable path gyp verb find Python - &quot;python2&quot; is not in PATH or produced an error gyp verb find Python checking if Python is C:\Python37\python.exe gyp verb find Python - executing &quot;C:\Python37\python.exe&quot; to get version gyp verb find Python - &quot;C:\Python37\python.exe&quot; could not be run gyp verb find Python checking if Python is C:\Python27\python.exe gyp verb find Python - executing &quot;C:\Python27\python.exe&quot; to get version gyp verb find Python - &quot;C:\Python27\python.exe&quot; could not be run gyp verb find Python checking if the py launcher can be used to find Python gyp verb find Python - executing &quot;py.exe&quot; to get Python executable path gyp verb find Python - &quot;py.exe&quot; is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if &quot;python3&quot; can be used gyp ERR! find Python - &quot;python3&quot; is not in PATH or produced an error gyp ERR! find Python checking if &quot;python&quot; can be used gyp ERR! find Python - &quot;python&quot; is not in PATH or produced an error gyp ERR! find Python checking if &quot;python2&quot; can be used gyp ERR! find Python - &quot;python2&quot; is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - &quot;C:\Python37\python.exe&quot; could not be run gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - &quot;C:\Python27\python.exe&quot; could not be run gyp ERR! find Python checking if the py launcher can be used to find Python gyp ERR! find Python - &quot;py.exe&quot; is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python=&quot;C:\Path\To\python.exe&quot; gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python &quot;C:\Path\To\python.exe&quot; gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:302:47) gyp ERR! stack at PythonFinder.runChecks (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:200:18) gyp ERR! stack at PythonFinder.execFileCallback (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:266:16) gyp ERR! stack at exithandler (node:child_process:420:5) gyp ERR! stack at ChildProcess.errorhandler (node:child_process:432:5) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12) gyp ERR! stack at onErrorNT (node:internal/child_process:476:16) gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) gyp ERR! System Windows_NT 10.0.19044 gyp ERR! command &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;D:\\Projects\\Quadque-Tech-Server\\node_modules\\node-gyp\\bin\\node-gyp.js&quot; &quot;rebuild&quot; &quot;--verbose&quot; &quot;--libsass_ext=&quot; &quot;--libsass_cflags=&quot; &quot;--libsass_ldflags=&quot; &quot;--libsass_library=&quot; gyp ERR! cwd D:\Projects\Quadque-Tech-Server\node_modules\node-sass gyp ERR! node -v v18.12.1 gyp ERR! node-gyp -v v7.1.2 gyp ERR! not ok Build failed with error code: 1 npm WARN acorn-import-assertions@1.8.0 requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself. npm WARN prosemirror-utils@0.9.6 requires a peer of prosemirror-tables@^0.9.1 but none is installed. You must install peer dependencies yourself. npm WARN css-loader@1.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN file-loader@2.0.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;win32&quot;,&quot;arch&quot;:&quot;x64&quot;}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@6.0.1 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@6.0.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Tanjib\AppData\Roaming\npm-cache\_logs\2023-01-08T15_14_38_129Z-debug.log</pre> <p><strong>注意:我使用纱线安装了一些东西,然后就发生了这种情况。我以前没有用过纱线。我想我搞砸了一些事情。</strong> 它总是显示 python 错误。为什么 ? 我卸载并重新安装了node.js。但错误就是不去。帮助。</p>
P粉566048790
P粉566048790

모든 응답(1)
P粉225961749

이는 Python 3.x가 시스템에 아직 설치되지 않았거나 Python용 설치 바이너리 폴더가 PATH에 없음을 의미합니다. Python 설치 프로그램은 설치 폴더를 PATH 환경 변수에 추가할 수 있어야 합니다.

Python이 설치되어 있는데도 이 오류가 계속 발생하는 경우 다음 단계를 따르세요.

  1. 시작 메뉴를 마우스 오른쪽 버튼으로 클릭하고 시스템으로 이동
  2. 고급 시스템 설정을 클릭하세요
  3. 환경 변수를 클릭하세요
  4. PATH를 선택하고 "편집..."을 클릭하세요.
  5. "새로 만들기"를 클릭하고 Python의 설치 바이너리 폴더를 목록에 추가하세요.
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!