not able to install numpy in ubuntu 14.04 [duplicate] - python

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

Related

Installation error while installing scrapy [duplicate]

This question already has answers here:
Error while installing Scrapy: path not specified
(2 answers)
Closed 4 years ago.
My system is windows 8.1 and installed python 3.7.2. Now, whenever I try to install -> pip install scrapy.
It always shows me an error mention below:
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'
----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-5lpvl9q3\\Twisted\\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\User\AppData\Local\Temp\pip-record-5pmlq_y_\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-5lpvl9q3\Twisted\
Thanks for help!
Fist, you can try to upgrade setuptools and try again. (You did not specify is there problem only with Scrapy or with everything else you're trying to install?)
python -m pip install --upgrade pip setuptools wheel
My suggestion is to use virtual env or conda on windows.
Here's how:
https://doc.scrapy.org/en/latest/intro/install.html#windows

Error when installing turicreate [duplicate]

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

pip install urllib2 #failed [duplicate]

This question already has answers here:
Python 3.2 Unable to import urllib2 (ImportError: No module named urllib2) [duplicate]
(3 answers)
Closed 5 years ago.
I am trying to install urllib2 in cmd console to import it from python 3.5.
I am getting this error:
pip install urllib2
Failed building wheel for urllib2
Command "c:\anaconda\python.exe -u -c "import setuptools, tokenize;file='C:\Users\NA401134\AppData\Local\Temp\pip-build-7meqhp18\urllib2\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\NA401134\AppData\Local\Temp\pip-it4nmmne-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\NA401134\AppData\Local\Temp\pip-build-7meqhp18\urllib2\
urllib2 is a built-in package in Python 2. You don't need to pip install it. Did you mean urllib3?

pip install pandas error

Hi all i typed pip install pandas but i kept getting this error.
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\use
rs\\huihui\\appdata\\local\\temp\\pip_build_HuiHui\\pandas\\setup.py';exec(compi
le(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __fil
e__, 'exec'))" install --record c:\users\huihui\appdata\local\temp\pip-ecokb6-re
cord\install-record.txt --single-version-externally-managed --compile failed wit
h error code 1 in c:\users\huihui\appdata\local\temp\pip_build_HuiHui\pandas
Storing debug log for failure in C:\Users\HuiHui\pip\pip.log
can anyone shed some light on this?
pip will try to install from source and I deduce from the C: that you are on windows - as such you probably don't have the compiler(s) needed to build pandas. You should download install the appropriate windows installer from https://pypi.python.org/pypi/pandas instead.

python can't install mysql library

I want to connect to mysql database from python
I tried to do this: pip install mysql-python as this question suggested No module named MySQLdb
but I got this exception
Cleaning up...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\use
rs\\user\\appdata\\local\\temp\\pip_build_User\\mysql-python\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-kkagjy-re
cord\install-record.txt --single-version-externally-managed --compile failed wit
h error code 1 in c:\users\user\appdata\local\temp\pip_build_User\mysql-python
Storing debug log for failure in C:\Users\User\pip\pip.log
In my python code, I keep getting this error
No module named MySQLdb
I am using windows 7
I found the solution myself
http://www.codegood.com/archives/129
download that and it is enough

Categories

Resources