当前位置: 代码迷 >> python >> 无法在Win系统上的Ubuntu虚拟机中安装Scrapy(Shell)
  详细解决方案

无法在Win系统上的Ubuntu虚拟机中安装Scrapy(Shell)

热度:54   发布时间:2023-06-19 09:27:18.0

我是VM的新手,但正在关注DKL的《学习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

你可以试试:

sudo apt-cache search scrapy

找出包装名称。 在新的Ubuntu系统上,软件包名称为python-scrapy ,因此:

sudo apt-get install python-scrapy

您可以随时使用pip安装Scrapy:

pip install scrapy