I tried to install matplotlib ( third party lib) on gcp vm and failed.
gcp vm python documantation says use pip install -t lib/ <library_name> but actually, what they really mean: i.g. use pip install matplotlib -t lib/ <library_name> And it didn't work
I tried:
sudo pip install matplotlib -t env/gcplib
result:
"**Failed building wheel for subprocess32**"
"Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-install-Rpkv8i/subprocess32/setup.py
';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fi
le__, 'exec'))" install --record /tmp/pip-record-x4Y1E4/install-record.txt --single-version-externally-managed --co
mpile" **failed with error code 1** in /tmp/pip-install-Rpkv8i/subprocess32/"
I will very appreciate any help
Before attempting to install matplotlib, you need to install python-dev. You didn't mention what OS your VM was, but if it's Ubuntu, you would do that with:
sudo apt-get install python-dev
Related
I am running ubuntu 16. I have both python 2.7 and 3.5 installed. I want to install cx_freeze latest version for python3. I downloaded the package from their website but couldn't run the setup.py file as it always gave me errors. Also i have installed pip3, but it still doesn't work for me. all the answers online are for older version of cx_freeze so a fresh answer for the new version will be helpful.
I install and upgrade pip3 with:
sudo -H install --upgrade pip
then I try to install cx_freeze with:
pip3 install cx_Freeze .
then i get the following errors:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ngco46uq/cx-Freeze/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-q3n3cd2r-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-ngco46uq/cx-Freeze/
also anyone can tell me any other method to do so ?
Try installing Pip3 using :
sudo apt-get install python3-pip
If you have Python 2.7, you can try alternatives like py2exe
Ok, I've installed Linux subsystem in my Windows 10 and now following this tutorial to install google earth engine inside my Linux subsystem.
When I try to run following command to install GEE API, I get following error (I am getting the same error for "sudo pip install 'pyOpenSSL>=0.11'" command as well.):
sudo pip install earthengine-api
> Command "/usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-PrUuzi/cryptography/setup.py';f=get
> attr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec' ))" install
> --record /tmp/pip-3eTIvM-record/install-record.txt --single-version-externally-managed --compile" failed wit h error code 1 in /tmp/pip-build-PrUuzi/cryptography/
Then after failing this, I tried to manually download and install the GEE setup.
I copied the downloaded compressed package to folder: "C:\Users\Saurabh\AppData\Local\lxss\home\saurabh"
and then tried to do the ls -a to see if I can see the file or not. But it is not visible:
What I am doing wrong here?
As mentioned in this thread, I updated setuptools and pip to the latest versions and I am finally able to run the earthengine-api without any issue.
I'm getting an error after installing MySQL Connector for Python 2.7.9 in Linux OS.
Command /usr/bin/python -c "import setuptools,
tokenize;file='/tmp/pip-build-5nxFZ_/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record /tmp/pip-qLvsiw-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-5nxFZ_/mysql-connector-python-rf
Storing debug log for failure in /home/pi/.pip/pip.log
Searched a lot about this error couldn't find a satisfactory solution, please help me to sort out this error.
Thank you. :)
use
pip install mysqlclient
as Mysql-Python and all are not supported now. install mysql in linux and install the connector to connect to local mysql
try this ,
pip install MySQL-python==1.2.5 # version specified
or
pip install MySQL-python
if you already installed required systems for python 2.7. Next, You should run this command:
sudo apt-get install python2.7-mysqldb
I am pretty new to python. I want to use KMean code, and I want to install scikit-learn or sklearn.
I used this code to attempt install these packages:
pip install -U sklearn
pip install -U scikit-learn
But I got this error:
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_reihaneh/sklearn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-89YQB7-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_reihaneh/sklearn
Storing debug log for failure in /home/reihaneh/.pip/pip.log
What is the cause of the problem?
pip install -U <package>, short for pip install --upgrade <package>, will upgrade <package> to the most recent stable version in the pip repo.
pip install <package> will install the most recent stable version of <package> in the pip repo.
The difference is upgrading vs. installing. You want the latter.
scikit-learn requires scipy and numpy, so here are the commands you should issue:
pip install numpy
pip install scipy
pip install scikit-learn
If you already have any of the dependencies, just plug in a -U between pip install and the package name.
If you're using Python 3.x, replace pip with pip3.
I have python 3.4 compiled from sources on my debian 7.8.
I have already installed some Python packages using pip and virtualenv (django, pillow etc), but i have an error installing python-phonenumbers (https://github.com/daviddrysdale/python-phonenumbers).
I tried it using virtualenv and without, running pip3 install phonenumbers and manually downloading archive and running python3 setup.py install. Every time I get same error:
Command "/usr/local/bin/python3.4 -c "import setuptools, tokenize;
__file__='/tmp/pip-build-ogsbxm_d/phonenumbers/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__)
.read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-98gunm55-record/install-record.txt
--single-version-externally-managed --compile"
failed with error code -9 in /tmp/pip-build-ogsbxm_d/phonenumbers
I tried it on my windows and ubuntu 14.04 - everything ok. How can i fix it?
For Ubuntu 14.04, from Docker image python:3.4.3-slim this combination worked for me:
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y python3.4-dev
sudo apt-get install -y libpq-dev
pip3 install psycopg2
Note build-essential package. It was crucial in my case. Maybe it will help you too.