Pip install killed - out of memory - how to get around it?

后端 未结 3 1976
醉梦人生
醉梦人生 2021-01-18 06:15

I\'m trying to install spaCy, a library for natural language processing.

root@vps:~# python3 -m pip install spacy
Collecting spacy
  Using cached https://fil         


        
3条回答
  •  借酒劲吻你
    2021-01-18 06:23

    not sure if this will work but have you tried compiling from source? this script is at Spacy's pypi page. No idea if this would manage RAM constraint better than regular pip install but it's something I would try.

    # make sure you are using the latest pip
    python -m pip install -U pip
    git clone https://github.com/explosion/spaCy
    cd spaCy
    
    python -m venv .env
    source .env/bin/activate
    export PYTHONPATH=`pwd`
    pip install -r requirements.txt
    python setup.py build_ext --inplace
    

提交回复
热议问题