python - 安装twisted时出错
问题描述
我正在尝试通过使用安装scrapy,pipenv install scrapy
但是在安装依赖项时。它失败。
Installing scrapy…
Adding scrapy to Pipfile's [packages]…
Installation Succeeded
Installing dependencies from Pipfile.lock (ad2c1d)…
================================ 25/25 - 00:00:06
An error occurred while installing twisted==19.10.0 ; python_version >= '3.5'
我在虚拟环境中运行 python 3.8。使用 Pycharm 作为我的 IDE。
我最初认为也许我使用的是导致冲突的旧版本的 Python。
我的点子文件:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
scrapy = "*"
[requires]
python_version = "3.8"
解决方案
安装 scrapy viapip
很棘手,因为它是依赖项twisted
并且lxml
需要 C++ 编译器。
只有一种可靠且官方推荐的(docs)方法可以在 Windows 上安装它 - 使用 anaconda 发行版(不是pip
推荐阅读
- asp.net-core - 使用 net core 3.1 保存文件
- javascript - 如何使用 axios 在反应 js 中产生预期错误
- r - 使用 dplyr 生成多个成对比较
- java - com.mysql.cj.jdbc.exceptions.MysqlDataTruncation:数据截断:日期值不正确:
- python - 使用 USDA Food API 按食品名称而不是 foodID 进行搜索
- c++ - *New Coder* 格式化和操作符
- excel - 格式化表格样式“”,接收变量未定义错误码
- c# - Visual Studio 2019 类图设计器工具箱为空
- sql - 在 SQL Server 2016 中将日期从 T 格式转换为 YYYYMMDD 格式
- swift - 如何在 SwiftUI 中将滚动视图添加到屏幕的特定部分?