无法在Win系统上的Ubuntu虚拟机中安装Scrapy(Shell)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法在Win系统上的Ubuntu虚拟机中安装Scrapy(Shell)相关的知识,希望对你有一定的参考价值。
我是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
答案
你可以试试:
sudo apt-cache search scrapy
找出包名。在新的Ubuntu系统上,包名是python-scrapy
,因此:
sudo apt-get install python-scrapy
另一答案
您可以随时使用pip
安装Scrapy:
pip install scrapy
以上是关于无法在Win系统上的Ubuntu虚拟机中安装Scrapy(Shell)的主要内容,如果未能解决你的问题,请参考以下文章