Error when installing turicreate [duplicate] - python

This question already has answers here:
pip install failing with: OSError: [Errno 13] Permission denied on directory
(9 answers)
Closed 5 years ago.
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.

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

Related

Error when installing src on command prompt [duplicate]

I am failing to install SRC in Linux Mint 19 via PIP. I have attempted to paste the output and failed horribly, I have had to double space everything, otherwise, it comes out as one long run-on sentence. Not sure how to paste a readable output of my Linux terminal here. Sorry.....
Failed building wheel for src
Running setup.py clean for src
Failed to build src
Installing collected packages: src
Running setup.py install for src ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-l2mswq/src/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
/tmp/pip-AeHl8U-record/install-record.txt --single-version-externally-managed --
compile --user --prefix=:
running install
error: error in command line: command 'InstallCommand' has no such option
'compile'
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-
build-l2mswq/src/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record /tmp/pip-AeHl8U-record/install-record.txt -
-single-version-externally-managed --compile --user --prefix=" failed with error
code 1 in /tmp/pip-build-l2mswq/src/
pip install src
tries to install src from PyPI — a package specifically created to not to be installed.
What are you trying to install?

pip install - running build_ext error: [WinError 2] The system cannot find the file specified

I'm trying to install the dialogflow package in Pycharm virtual environment using pip:
pip install dialogflow
and it stops at this error:
running build_ext
error: [WinError 2] The system cannot find the file specified
'Command "C:\Users\mclovine\PycharmProjects\sunshinveconv\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\mclovine\\AppData\\Local\\Temp\\pip-install-zotus0_t\\grpcio\\setup.py';f=getattr(
tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\mclovine\AppData\Local\Temp\pip-record-ub03a865\install-record.txt --si
ngle-version-externally-managed --compile --install-headers C:\Users\mclovine\PycharmProjects\sunshinveconv\venv\include\site\python3.8\grpcio" failed with error code 1 in C:\Users\mclovine\AppData\Local\Temp\pip-instal
l-zotus0_t\grpcio\'
When I try the same installation in conda virtual environment, it works and there's no error.
I'm using: Windows64, Python 3.8.3, Visual C++ BuildTools 14.0
Any help would be appreciated, thank you
Downgrade to Python 3.7 works for me (ref: https://github.com/gunthercox/ChatterBot/issues/1699#issuecomment-680807921)

ATD (after the deadline) for python 3.6 unable to install

When using sudo pip3 install atd to try and download the "after the deadline" module atd for python 3.6 I get the following error:
Failed to build atd
Installing collected packages: atd
Running setup.py install for atd ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tfcxr6us/atd/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xsek23ca-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/atd
copying atd/__init__.py -> build/lib/atd
copying atd/atd.py -> build/lib/atd
running build_scripts
creating build/scripts-3.6
error: file '/tmp/pip-build-tfcxr6us/atd/bin\atddir.py' does not exist
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tfcxr6us/atd/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xsek23ca-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tfcxr6us/atd/
The package atd is a connector for McAfee ATD API. Is it what you want?
The package is outdated because its setup.py uses ez_setup, deprecated and removed from setuptools long ago. The package was not updated since 2015.
The package is only for windows as its setup.py declares a script bin\\atddir.py.
I'm sure the module is unusable. Perhaps it's not what you want. What "after the deadline" module are you looking for?

not able to install numpy in ubuntu 14.04 [duplicate]

This question already has answers here:
how can I fix permission denied error while trying to install pyrebase
(2 answers)
Closed 5 years ago.
error: could not create '/usr/local/lib/python2.7/dist-packages/numpy': Permission denied
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_mark/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-TKmHYa-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_mark/numpy
Try running with super-user priviledges (via sudo or by logging in as root) or better still install in a virtual environment

"pip install jq" generates errors on Mac and Windows

Duplicate of this issue, but the first answer there is wrong (jq is supported on Windows) and the second refers to brew so I'm guessing is for Mac.
Windows
I am trying to install jq for python from the Windows command line, but get the following errors, possibly due to a missing temp\pip-build-rtnhmg\jq\onig-install-5.9.6 file:
error: [Error 2] The system cannot find the file specified
... and ...
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\
Does anyone know what's gone wrong here? Searches on StackOverflow and Google aren't giving me much to go on, and I'm not great with Windows and still new to python/pip.
Here is the full text, minus username:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>pip install jq
Collecting jq
Using cached jq-0.1.6.tar.gz
Building wheels for collected packages: jq
Running setup.py bdist_wheel for jq ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\<USERNAME>\appdata\local\temp\tmpuvrf_upip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
Executing: ./configure CFLAGS=-fPIC --prefix=c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\onig-install-5.9.6
error: [Error 2] The system cannot find the file specified
----------------------------------------
Failed building wheel for jq
Running setup.py clean for jq
Failed to build jq
Installing collected packages: jq
Running setup.py install for jq ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Executing: ./configure CFLAGS=-fPIC --prefix=c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\onig-install-5.9.6
error: [Error 2] The system cannot find the file specified
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\
Trying to install pyjq instead generates the same errors.
I'm not married to jq: I just need to format json data in python, and jq does a great job on the command line. If there are other python packages I should try instead, please feel free to recommend them. As mentioned above though, pyjq is failing install with the same errors.
Further details / steps taken:
I am on Windows 10 and have installed python 2.7.13, setuptools and pip using the steps from here ... no issues noted.
Using pip, I have successfully installed other python packages such as request and jira ... no issues noted.
Using chocolatey I have successfully installed jq for the command line, following these steps ... no issues noted.
I have tried using regular permissions, running cmd as administrator, starting a new cmd session, restarting the PC - but get the same errors.
Trying to install pyjq (pip install pyjq) generates the same errors.
Tried pip install jq on a Mac and got similar errors:
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-build-DyMoT4/jq/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/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-i6UKvt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-build-DyMoT4/jq/
for the Mac, followed the steps suggested from here and successfully installed setuptools as suggested, but pip install jq still fails with the same error.
Installing via pip
As per jq installation steps for pip's project:
Installation requires any programs required to build jq. This includes:
Autoreconf
The normal C compiler toolchain, such as gcc and make.
libtool
Python headers.
macOS
On macOS, you need XCode to be installed, and the following packages:
brew install autoconf automake libtool
brew install jq
Linux
You need the following packages to be installed:
yum install autoconf automake libtool python

Categories

Resources