简体   繁体   English

在我的virtualenv上命令pip install d3时出现安装错误

[英]Installation error when commanding pip install d3 on my virtualenv

When I commanded pip install d3 to install the package, I got the following error. 当我命令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/

To resolve the issue, I tried to google it and found that pip install -U setuptools would solve the issue, however it didn't work to my case. 为了解决该问题,我尝试用Google搜索它,发现pip install -U setuptools可以解决此问题,但是不适用于我的情况。 I also tried to command it by sudo but result is same. 我也尝试通过sudo命令它,但是结果是一样的。

My python version is 3.6.5 . 我的python版本是3.6.5 What is the problem? 问题是什么? I need your help a lot. 我非常需要您的帮助。

Thanks. 谢谢。

You should run the pip3 command since you are using python 3.6.5 the command would be as follows: 您应该运行pip3命令,因为您正在使用python 3.6.5,该命令如下所示:

pip3 install js.d3

Then once that is successful you can use the following: 然后,一旦成功,您可以使用以下方法:

from js.d3 import d3
d3.need()

This was straight from the Python Software Foundation Page which can be found here: Python_Software_Foundation_Page 直接来自Python软件基础页面,可在以下页面找到: Python_Software_Foundation_Page

pip install --upgrade setuptools

or 要么

sudo pip install --upgrade setuptools

您是否正在寻找pip3安装js.d3并使用like-从js.d3导入d3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM