Help me, all
I have some error while installation of pycurl on ubuntu 18,04
I tried follow as:
apt-cache depends python-pycurl
sudo apt install libcurl4-gnutls-dev
apt-cache search gnutl | grep dev
sudo apt-get install libgnutls-dev
sudo apt install python-pycurl
pip install pycurl
but, failed to install.
Thanks!
I fixed it.
sudo apt-get install libssl-dev libcurl4-openssl-dev python3.8-dev
and by referring to these links Error in installation pycurl 7.19.0, https://github.com/pycurl/pycurl/issues/596.
In addtion, my python version is 3.8, so I installed python3.8-dev.
Related
After upgrading your Ubuntu 16.04 LTS to the latest Ubuntu 18.04 LTS, while using pip or pip3 facing this issue:
pkg_resources.DistributionNotFound: The 'pip==10.0.1' distribution was not found and is required by the application
What seems to solve the problem.
Firstly, removing pip from the computer by sudo apt-get purge python-pip
and then again reinstalling it by apt-get install python-pip python-dev build-essential or just sudo apt-get install python-pip wont fix the error. Because pip-9.0.1 is being installed by default.
Actual solution
Installing using curl helped,
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and then python get-pip.py for python 2 and python3 get-pip.py for python 3.
sudo apt-get purge python-pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
pip --version
rm get-pip.py
Above shell command works for me!
For details, please refer to: https://stackoverflow.com/a/45887255/8596899
I wanna set up scrapy cluster follow this link scrapy-cluster,Everything is ok before I run this command:
pip install -r requirements.txt
The requirements.txt looks like:
cffi==1.2.1
characteristic==14.3.0
ConcurrentLogHandler>=0.9.1
cryptography==0.9.1
...
I guess the above command means to install packages in requirements.txt.But I don't want it to specify the version,So I change it to this:
cat requirements.txt | while read line; do pip install ${line%%[>=]*} --user;done
When install cryptography,it gives me the error:
build/temp.linux-x86_64-2.7/_openssl.c:12:24:fatal error:pyconfig.h:No such file or directory
#include <pyconfig.h>
I don't know how to solved this , I have tried a lot of methods ,but failed. my system is centos 7, and the version of python is 2.7.5(default).
Besides, Is there any other scrapy frame which is appliable for a large number of urls . Thanks in advance
For Ubuntu, python2
apt-get install python-dev
For Ubuntu, python3
apt-get install python3-dev
I have solved it by myself. for the default python of centos, there is only a file named pyconfg-64.h in usr/include/python2.7/,So run the command
yum install python-devel
Then it works.
for python3.6,
apt-get install python3.6-dev
and
apt-get install libssl-dev libffi-dev
i use python 2 on ubuntu and got the same problem when installing cryptography.
after i run this command
apt-get install python-dev libssl-dev libffi-dev
then it works.
For Python 3.7 on Debian, the following works for me.
apt-get install python3.7-dev
and
apt-get install libssl-dev
You may also need:
apt-get install libffi-dev
On a Debian based distro (AntiX distro), together with apt-get install python3-dev, I also installed rust, to complete successfully the pip3 install cryptography command. So, I gave:
$ sudo apt-get install build-essential curl python3-dev libssl-dev libffi-dev
$ sudo curl https://sh.rustup.rs -sSf | sh
When prompted (Figure 1), type 1 and hit Enter on your keyboard.
Once it completes, you have to give following commands:
$ source $HOME/.cargo/env
$ source ~/.profile
$ pip3 install cryptography
I'm trying to install python-numpy package on my ubuntu 14.04 machine. I ran sudo apt-get install python-numpy command to install it and it says the package has been installed but when i try to access it, i'm unable to do so.
When you type:
sudo pip install package-name
It will default install python2 version of package-name some packages might be supported in both python3 and python3 some might work might not
I would suggest
sudo apt-get install python3-pip
sudo pip3 install MODULENAME
or can even try this
sudo apt-get install curl
curl https://bootstrap.pypa.io/get-pip.py | sudo python3
sudo pip3 install MODULENAME
Many python packages require also the dev package, so install it too:
sudo apt-get install python3-dev
Also check for the sys.path [ make sure module is in the python path ]
I'm trying to install Pillow on Ubuntu 14.04 using this command:
pip install Pillow
but the installation fails with this error:
ValueError: --enable-jpeg requested but jpeg not found, aborting.
The problem was that the package libjpeg-dev was not installed. To solve the problem you should do this:
sudo apt-get install libjpeg-dev
Make sure Python-development packages are installed, if not then install it using the following commands :
For Ubuntu
sudo apt-get install python3-dev python3-setuptools
For Fedora
sudo dnf install python-devel
After installing the development packages install the following :
For Ubuntu
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
For Fedora
sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel
You have to install the missing dependencies and libraries that Pillow requires for it to work. Find the dependencies here
This are the current dependancies/libraries for Ubuntu 14.04 for Pilllow 3.0.0+. Install them by running the command below
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
There may be a problem where pip is relying on a cached version of the dependencies, and clearing the cache can sometimes solve the problem. Just type
$ rm -rf ~/.cache/pip
Source: github issue
You need to follow this tutorial Install pillow doc.
If you had installed, just uninstall and reinstall again:
$ pip uninstall pillow
$ pip install pillow --no-cache-dir
I came across a tutorial which lists a number of libraries to install before installing Django (I am using Ubuntu 14.04, Python3, and Django 1.8):
$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get install -y build-essential
$ sudo apt-get install python-setuptools python-dev python3.4-dev python-software-properties libpq-dev
$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev
$ sudo apt-get build-dep python-imaging
But other tutorials may not list so many libraries to install. I wonder which are absolutely necessary, and others may be omitted?
You only need to install these dependencies if you want image processing via pillow and if you plan on installing it via pip (the Python package manager) rather than apt-get (Ubuntu's package manager).
Since you're using a virtualenv, you will need to install this package from source. The following commands will get the build dependencies and install pillow using pip.
$ sudo apt-get build-dep python3-imaging
$ pip install pillow
Note that pillow is a beast to compile. Be prepared to wait several minutes.