【发布时间】:2018-08-21 05:09:07
【问题描述】:
我正在尝试安装 py2neo 模块,但以以下错误结束。请帮我解决它。
(base) C:\Users\ADMIN>pip install py2neo Collecting py2neo Using cached https://files.pythonhosted.org/packages/cd/79/a77cc0ad86c021c25dac9f52a0cd33f6832c6af7fa5e58f4438d781ae9c3/py2neo-4.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\admin\appdata\local\temp\pip-install-xj8t67\py2neo\setup.py", line 25, in <module>
from py2neo.meta import __author__, __email__, __license__, __package__, __version__
File "py2neo\__init__.py", line 19, in <module>
from py2neo.data import *
File "py2neo\data.py", line 26, in <module>
from py2neo.cypher import LabelSetView, cypher_repr, cypher_str
File "py2neo\cypher\__init__.py", line 36, in <module>
from py2neo.internal.collections import SetView
File "py2neo\internal\collections.py", line 24, in <module>
from py2neo.internal.compat import bytes_types, string_types
File "py2neo\internal\compat.py", line 45, in <module>
DEVNULL = open(devnull, "rw")
ValueError: Invalid mode ('rw')
Command "python setup.py egg_info" failed with error code 1 in c:\users\admin\appdata\local\temp\pip-install-xj8t67\py2neo\
我也尝试升级 setuptools 和 pip,但之后也无法安装 py2neo。
我的 python 版本是 2.7,在 win 10 操作系统上工作。
【问题讨论】:
-
来自自述文件:“另请注意,Py2neo 是在 Linux 下使用标准 CPython 发行版开发和测试的。虽然其他操作系统和 Python 发行版也可以工作,但不提供对它们的支持。”