21

I am trying to install behave-parallel using pip install. I have installed programmes previously using pip so I know my Python/script path is correct in my env variables. However I am seeing the following error

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

how can I resolve this issue

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\
Richard C
  • 513
  • 1
  • 7
  • 26

4 Answers4

47

In my case with the same error, the solution was to do

pip3 install --upgrade pip 

It was my pip3 that was in version 9.X were it's now in version 19.X

Couz
  • 619
  • 5
  • 8
8

The package is simply broken, as it is missing the setup.py file.

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

You might be able to download the source from Github or wherever and package it yourself (python setup.py bdist_wheel), then install that wheel (pip install ../../dist/behave-parallel...whl).

AKX
  • 152,115
  • 15
  • 115
  • 172
6

There is a newer feature for building python packages (see also PEP 517 and PEP 518). A package can now be built without setup.py (with pyproject.toml), but older pip versions are not aware of this feature and raise the error shown in the question.

So if you have reason to believe that the library was packaged properly, try updating pip to something newer (version 19 or newer will probably work).

  • 1
    Even if you do have a setup.py, some features of the requirements file require a newer pip. I had a build that was failing when using `-e path/to/package#egg=package` and a `pip -U install pip` before installing the requirements solved this for me. – Aaron D Dec 08 '20 at 17:40
0

Here it seems caused by setup.py not being in the root of my project. (it can't be in root because otherwise the unit test will "discover" setup.py and fail it because it's not a test)

rewind
  • 9
  • 1
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/28957664) – Synthase May 13 '21 at 10:02
  • @Synthase: Why not? It’s suggesting the `setup.py` needs to be the root of the project. That may not be a _correct_ answer, but that’s what downvoting is for. – Jeremy Caney May 13 '21 at 20:55
  • @JeremyCaney Although this may be considered as a OK, the fact that the author refers to "my project" add confusion to a pretty evasive answer. We don't know if the author refers to a directory structure (that would not be from the OP btw) or simply to his own project. Looks like a "I had a problem too and the fix was this" with no reference to the original question. – Synthase May 13 '21 at 21:03