I followed the official guide, but got this error message:
The following packages have unmet dependencies:
scrapy : Depends: python-support (>= 0.90.0) but it is not installable Recommends: python-setuptools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I then tried sudo apt-get python-support
, but found ubuntu 16.04 removed python-support
.
Lastly, I tried to install python-setuptools
, but seems it only would install python2 instead.
The following additional packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python
python-minimal python-pkg-resources python2.7 python2.7-minimal
Suggested packages:
python-doc python-tk python-setuptools-doc python2.7-doc binutils
binfmt-support
The following NEW packages will be installed:
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python
python-minimal python-pkg-resources python-setuptools python2.7
python2.7-minimal
What should I do to use Scrapy
in the Python 3 environment on Ubuntu 16.04? Thanks.
You should be good with:
This is an example Dockerfile to test installing scrapy on Python 3, on Ubuntu 16.04/Xenial:
Then, after building the Docker image and running a container for it with:
you can run
pip install scrapy
Below I'm using
virtualenvwrapper
to create a Python 3 virtualenv:And installing scrapy 1.1 is a matter of
pip install scrapy
Finally testing the example project: