0

我是 VM 新手,但正在关注 DKL 的《Learning Scrapy》一书。它似乎是通过 Vagrant 和 VirtualBox 建立一个虚拟环境。我想我已经设置好了一切——安装了 ubuntu 12.04.5 LTS 的 Vagrant 和 VirtualBox。

然后我使用 Cmder.exe(在我的项目文件夹 e:...\Project 中)访问 Vagrant

λ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

λ vagrant ssh
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
New release '14.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

This Ubuntu 12.04 LTS system is past its End of Life, and is no longer
receiving security updates.  To protect the integrity of this system, it’s
critical that you enable Extended Security Maintenance updates:
 * https://www.ubuntu.com/esm

Welcome to your Vagrant-built virtual machine.
Last login: Sat Sep 15 23:40:43 2018 from 10.0.2.2

vagrant@precise64:~$ sudo apt-get install scrapy
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package scrapy
4

2 回答 2

0

您始终可以使用以下命令安装 Scrapy pip

pip install scrapy
于 2018-09-16T07:19:04.603 回答
0

你可以试试:

sudo apt-cache search scrapy

找出包名称。在新的 Ubuntu 系统上,包名是python-scrapy,所以:

sudo apt-get install python-scrapy
于 2018-09-16T01:05:50.363 回答