# Cross link error with any Python package i use

**URL:** <https://forum.serverless.com/t/cross-link-error-with-any-python-package-i-use/10180>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 5, 2020, 9:50am UTC](https://forum.serverless.com/t/cross-link-error-with-any-python-package-i-use/10180 "2020-01-05T09:50:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChaithraKumar123](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@ChaithraKumar123](https://forum.serverless.com/u/ChaithraKumar123)\
**Post date:** [January 5, 2020, 9:50am UTC](https://forum.serverless.com/t/cross-link-error-with-any-python-package-i-use/10180/1 "2020-01-05T09:50:54Z")

</div>

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/shutil.py”, 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’

---

<div class="post-metadata">

**Author:** ![ChaithraKumar123](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@ChaithraKumar123](https://forum.serverless.com/u/ChaithraKumar123)\
**Post date:** [January 7, 2020, 11:53pm UTC](https://forum.serverless.com/t/cross-link-error-with-any-python-package-i-use/10180/2 "2020-01-07T23:53:32Z")

</div>

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!
