Cross link error with any Python package i use

Serverless: Installing requirements of requirements.txt in .serverless…
Serverless: Docker Image: lambci/lambda:build-python3.7

Error --------------------------------------------------

Error: ERROR: Exception:
Traceback (most recent call last):
File “/var/lang/lib/python3.7/”, line 566, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: ‘/tmp/pip-target-i801qxs4/lib/python/scikit_learn-0.21.3.dist-info’ -> ‘/var/task/.serverless/requirements/scikit_learn-0.21.3.dist-info’

ust make sure all your files exists in the same directory.
Especially we you run sls deploy make sure you run that with proper permission.
just do ls -la you will get list of all hidden files. .serveless directory must be create in the same filesystem.
if its created in the root and you have other files in your user filesystem.Just try avoiding sudo.
if sls deploy (without sudo) throws error remove .serveless directory and again run the sls deploy without sudo.
The key is all your files must be in same filesystem.
This solved my error!