我在Ubuntu 18.04上安装Scrapy时遇到问题。我已经尝试了很长时间来安装它,并且Twisted和其他软件包似乎存在问题。我现在要编程,因此,希望您能从命令行中获得有关以下消息的任何建议:
Command "/home/.../bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-.../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 /tmp/pip-record-_.../install-record.txt --single-version-externally-managed --compile --install-headers /home/.../python3.6/Twisted" failed with error code 1 in /tmp/pip-install-yypirmho/Twisted/
当我尝试安装python3-dev时,我也遇到以下问题。 Scrapy教程要求输入以下(Scrapy Installation Instructions):
sudo apt-get install python3 python3-dev
我的计算机上安装了python 3.6,这是我尝试使用sudo安装python3-dev时得到的:
sudo apt-get install python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-dev : Depends: libpython3-dev (= 3.6.5-3ubuntu1) but it is not going to be installed
Depends: python3.6-dev (>= 3.6.5-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
经过一些搜索,我尝试使用Pip3安装python3-dev,并且得到以下信息:
$ pip3 install python3-dev
Collecting python3-dev
Could not find a version that satisfies the requirement python3-dev (from versions: )
No matching distribution found for python3-dev
任何有关此问题的建议将不胜感激,因为我花了很多时间尝试解决此问题。