代码之家  ›  专栏  ›  技术社区  ›  Richard C

pip install filenotfounderror:[errno 2]没有这样的文件或目录:

  •  1
  • Richard C  · 技术社区  · 8 年前

    我正在尝试使用pip install安装behave parallel。我以前安装过使用pip的程序,所以我知道我的python/script路径在env变量中是正确的。但是我看到了下面的错误

    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\.....Temp\\pip-install-rjiorrn7\\behave-parallel\\setup.py' 
    

    我怎样才能解决这个问题

    C:\Users\.....>pip install behave-parallel
    Collecting behave-parallel
     Using cached https://files.pythonhosted.org/packages/05/9d/22f74dd77bc4fa85d391564a232c49b4e99cfdeac7bfdee8151ea4606632/behave-parallel-1.2.4a1.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "c:\.........\python\lib\tokenize.py", line 447, in open
            buffer = _builtin_open(filename, 'rb')
        FileNotFoundError: [Errno 2] No such file or directory: 'C:\\.........\\AppData\\Local\\Temp\\pip-install-7vgf8_mu\\behave-parallel\\setup.py'
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:\.........\AppData\Local\Temp\pip-install-7vgf8_mu\behave-parallel\
    
    1 回复  |  直到 8 年前
        1
  •  2
  •   AKX Bryan Oakley    8 年前

    这个包裹只是坏了,因为它丢失了 setup.py 文件。

    $ tar tzvf behave-parallel-1.2.4a1.tar.gz | grep setup.py
    $
    

    您可以从github或任何地方下载源代码,并自行打包( python setup.py bdist_wheel ),然后安装车轮( pip install ../../dist/behave-parallel...whl )中。