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

2024-03-28 17:30:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我是新的虚拟机,但正在遵循的书-学习由DKL刮。它似乎正在通过Vagrant和VirtualBox建立一个虚拟环境。我想我已经准备好了所有的东西——安装了Ubuntu12.04.5LTS的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

Tags: thetorundefaultismachinevirtualboxup
2条回答

您可以尝试:

sudo apt-cache search scrapy

查找包名。在新的Ubuntu系统上,包名是python-scrapy,因此:

sudo apt-get install python-scrapy

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

pip install scrapy

相关问题 更多 >