由于环境标记错误无效,无法构建基于scrapy的项目

时间:2017-12-12 06:34:00

标签: python-3.x scrapy python-cryptography

我无法使用Ubuntu构建docker镜像作为我几个月前使用Scrapy编写的一个项目的基本操作系统。它显示以下依赖性错误 -

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

由于我无法控制Scrapy的依赖关系并且我一直在使用Scrapy 1.4.0,最新版本以及Python 3,我现在不确定我的选择是什么?

以下是我用来安装依赖项的命令

  

pip3 install -r requirements.txt

以下是我的requirements.txt看起来像

Downloading/unpacking cryptography>=2.1.4 (from pyOpenSSL->Scrapy==1.4.0->-r /app/requirements.txt (line 3))
  Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
    error in cryptography setup command: Invalid environment marker: platform_python_implementation != 'PyPy'
    Complete output from command python setup.py egg_info:
    error in cryptography setup command: Invalid environment marker: platform_python_implementation != 'PyPy'

更新

如下所示,在Mac机器上构建正常,但它在Ubuntu机器上不起作用。注意:即使是成功的构建也会对lxml==3.8.0 psycopg2==2.7.3.1 Scrapy==1.4.0 Twisted==17.5.0 validators==0.12.0 tweepy==3.5.0 发出警告,如下所示 -

platform_python_implementation != "PyPy"

1 个答案:

答案 0 :(得分:1)

该问题与pip3升级有关。该软件包的一个贡献者分享了提示here

相关问题