...
No Format |
---|
Instructions from: https://medium.com/@danielwzou/installing-spacy-and-other-packages-without-sudo-or-root-privileges-using-anaconda-59571ec0ecad
First, navigate to your home directory.
module load anaconda/5.3.1py3
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
Now, we have a local installation of the Conda package manager at ~/miniconda3
Let’s add conda to our bash profile so that we can call it from the command line
vim .bash_profile
i
Add this line to the file:
export PATH=$HOME/miniconda3/bin:$PATH
esc :wq
Now, let’s reload our .bash_profile
source .bash_profile
And check that our installation was completed successfully
which conda
Which should return ~/miniconda3/bin/conda
Now that Conda is installed, we can install Spacy or other Python packages
conda install spacy
python -m spacy download en
Now, let’s make sure that Spacy is installed correctly
python
import spacy
nlp = spacy.load('en')
doc = nlp(u'Hello World!')
print([w.lemma_ for w in doc])
Now that you have Conda installed, you can use it to install many packages locally. |
...