0

I just installed Ubuntu 18.04, and as the old versions, it comes with Python 2 and 3 already installed. However everything I try to install is requiring sudo or the --user flag.

The problem is that some libraries try to create content no /usr/local, thus I get Permission Denied (e.g.: trying to run python3 -m spacy download en).

How can I fix this? Should I just install Virtualenv without removing existing Python versions? Will Virtualenv take care of this and prevent conflict?

2 Answers 2

1

Yes, virtualenv will work. Otherwise just grant yourself write rights to /usr/local.

1

If you are trying to install (add things) to root owned directories like /usr/lib, /usr/local/lib or /usr/share, you should use "sudo" when you run it.

python3 -m spacy download en

seems like you are installing a python3 library into site-packages, which is definitely root owned.

So, if you want "spacy" to be available on the machine, you should use sudo. If you need spacy for your project only, create vritualenv and populate necessary libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.