当我命令pip install d3
安装包时,我收到以下错误。
(upload) Seungchului-MacBook-Pro:upload sclee$ pip3 install d3
Collecting d3
Using cached https://files.pythonhosted.org/packages/c9/20/aee1da98c819523d1c36f32232f28045cddba6f3411094fa5aa548f3db74/d3-0.1.0.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/w7/1l0pttwd5yg7nqn1j53l33mh0000gn/T/pip-install-kswsp3yr/d3/setup.py", line 8, in <module>
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/codecs.py", line 897, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/w7/1l0pttwd5yg7nqn1j53l33mh0000gn/T/pip-install-kswsp3yr/d3/README.rst'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w7/1l0pttwd5yg7nqn1j53l33mh0000gn/T/pip-install-kswsp3yr/d3/
为了解决这个问题,我试图谷歌它,并发现pip install -U setuptools
将解决这个问题,但它对我的情况不起作用。我也尝试用sudo
命令它,但结果是一样的。
我的python版本是3.6.5
。问题是什么?我需要你的帮助很多。
谢谢。
您应该运行pip3命令,因为您使用的是python 3.6.5,命令如下:
pip3 install js.d3
然后,一旦成功,您可以使用以下内容:
from js.d3 import d3
d3.need()
这可以直接来自Python Software Foundation页面,可以在这里找到:Python_Software_Foundation_Page
pip install --upgrade setuptools
要么
sudo pip install --upgrade setuptools
你在寻找pip3安装js.d3并使用like-来自js.d3 import d3