1

I'm trying to install a package called turicreate on my device. I want to use it in code written in python 2.7

I have both python 3.6 and python 2.7 on my device so I'm trying to use the command:

$ python2.7 -m pip install turicreate 

and then I get this error:

Running setup.py install for prettytable ... error Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4d/3qphp3b56cjdhdqh3jcv994r0000gn/T/pip-build-Uya2Ub/prettytable/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4d/3qphp3b56cjdhdqh3jcv994r0000gn/T/pip-3wU21B-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib copying prettytable.py -> build/lib running install_lib copying build/lib/prettytable.py -> /Library/Python/2.7/site-packages error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/prettytable.py' ---------------------------------------- Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4d/3qphp3b56cjdhdqh3jcv994r0000gn/T/pip-build-Uya2Ub/prettytable/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4d/3qphp3b56cjdhdqh3jcv994r0000gn/T/pip-3wU21B-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/4d/3qphp3b56cjdhdqh3jcv994r0000gn/T/pip-build-Uya2Ub/prettytable/ 

Could someone please propose a solution to this issue?

Thanks,

Abe

PS: I'm on Mac and doing this in terminal.

1
  • try sudo python2.7 -m pip install turicreate Commented Feb 10, 2018 at 4:45

1 Answer 1

0

This error means that you do not have administrator permissions to write in the dictionary. In order to gain this permission you need to use the sudo prefix.

sudo python2.7 -m pip install turicreate 
Sign up to request clarification or add additional context in comments.

1 Comment

Didn't work for Linux. However, by mac OS works fine. Why official documents are not correct and lead to issues?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.