I am trying to perform a serverless deployment. However, there seems to be an issue trying to get Scikit-learn==0.20.2 via requirements.txt. I am facing some challenges trying to resolve the following error.
Could someone please help ?
#######
(tensor) PS C:\Users\dines\Documents\AWS_Credit> serverless deploy
Serverless: Generated requirements from C:\Users\dines\Documents\AWS_Credit\requirements.txt in
C:\Users\dines\Documents\AWS_Credit\.serverless\requirements.txt...
Serverless: Installing requirements from
C:\Users\dines\Documents\AWS_Credit\.serverless\requirements\requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python3.8
Error --------------------------------------------------
Error: ERROR: Command errored out with exit status 1:
command: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-o9fpopt4
cwd: /tmp/pip-install-488q6q56/scikit-learn/
Complete output (15 lines):
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 153, in get_numpy_status
import numpy
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 250, in <module>
setup_package()
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 238, in setup_package
raise ImportError("Numerical Python (NumPy) is not "
ImportError: Numerical Python (NumPy) is not installed.
scikit-learn requires NumPy >= 1.8.2.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
----------------------------------------
ERROR: Failed building wheel for scikit-learn
ERROR: Command errored out with exit status 1:
command: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v9a8flz4/install-record.txt --single-version-externally-managed --home /tmp/pip-target-3bpxwb4u --compile --install-headers /tmp/pip-target-3bpxwb4u/include/python/scikit-learn
cwd: /tmp/pip-install-488q6q56/scikit-learn/
Complete output (15 lines):
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 153, in get_numpy_status
import numpy
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 250, in <module>
setup_package()
File "/tmp/pip-install-488q6q56/scikit-learn/setup.py", line 238, in setup_package
raise ImportError("Numerical Python (NumPy) is not "
ImportError: Numerical Python (NumPy) is not installed.
scikit-learn requires NumPy >= 1.8.2.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
----------------------------------------
ERROR: Command errored out with exit status 1: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-488q6q56/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v9a8flz4/install-record.txt --single-version-externally-managed --home /tmp/pip-target-3bpxwb4u --compile --install-headers /tmp/pip-target-3bpxwb4u/include/python/scikit-learn Check the logs for full command output.
at installRequirements (C:\Users\dines\Documents\AWS_Credit\node_modules\serverless-python-requirements\lib\pip.js:262:11)
at installRequirementsIfNeeded (C:\Users\dines\Documents\AWS_Credit\node_modules\serverless-python-requirements\lib\pip.js:448:3)
at ServerlessPythonRequirements.installAllRequirements (C:\Users\dines\Documents\AWS_Credit\node_modules\serverless-python-requirements\lib\pip.js:527:29)
at ServerlessPythonRequirements.tryCatcher (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\dines\Documents\AWS_Credit\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.16.1
Framework Version: 1.74.0 (standalone)
Plugin Version: 3.6.13
SDK Version: 2.3.1
Components Version: 2.31.4