Rebaler icon indicating copy to clipboard operation
Rebaler copied to clipboard

No such file or directory: 'rebaler/rebaler.py' error during installation with pip3

Open johnnyasena opened this issue 5 years ago • 4 comments

I receive the following error when trying to install Collecting git+https://github.com/rrwick/Rebaler.git Cloning https://github.com/rrwick/Rebaler.git to /tmp/pip-req-build-uznp9bpv Running command git clone -q https://github.com/rrwick/Rebaler.git /tmp/pip-req-build-uznp9bpv ERROR: Command errored out with exit status 1: command: /home/s953272/sw/REBALAR_ENV/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-uznp9bpv/setup.py'"'"'; file='"'"'/tmp/pip-req-build-uznp9bpv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-uznp9bpv/pip-egg-info cwd: /tmp/pip-req-build-uznp9bpv/ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-uznp9bpv/setup.py", line 16, in version = re.search('^version\s*=\s*"(.*)"', open('rebaler/rebaler.py').read(), re.M).group(1) FileNotFoundError: [Errno 2] No such file or directory: 'rebaler/rebaler.py' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Here is the command I used pip3 install git+https://github.com/rrwick/Rebaler.git

johnnyasena avatar Jan 21 '20 16:01 johnnyasena

I have also tried installing from source but get a si python3 setup.py install

Traceback (most recent call last): File "setup.py", line 16, in version = re.search('^version\s*=\s*"(.*)"', open('rebaler/rebaler.py').read(), re.M).group(1) FileNotFoundError: [Errno 2] No such file or directory: 'rebaler/rebaler.py'milar error message.

Here is the in the install command git clone https://github.com/rrwick/Rebaler.git cd Rebaler python3 setup.py

johnnyasena avatar Jan 21 '20 16:01 johnnyasena

I could solve this by installing earlier version of Rebaler

shmenolin avatar Mar 24 '20 20:03 shmenolin

Got the same error with the newest version, but could run it by using the rebaler-runner.py

lucast122 avatar Jul 02 '20 11:07 lucast122

Thanks @shmenolin! This saved me a lot of time. Anyways, I found the problem and a solution for all the curious out there: There are two small problems which hinder the installation of v0.2.0.

  1. The meta information wandered from rebaler/rebaler.py to rebaler/__main__.py but wasn't altered accordingly in 'setup.py'
  2. The version number in rebaler/__main__.py is surrounded by single instead of double quotes (as in previous versions) SOLUTION:
  • Change the quotes in 'rebaler/main.py' to double quotes
  • Change 'rebaler/reabler.py' to 'rebaler/main.py' in line 16 and 18 in the file 'setup.py' OR as a script: git clone https://github.com/rrwick/Rebaler.git cd Rebaler sed -i "s/__version__ = '\([[:digit:]].[[:digit:]].[[:digit:]]\)'/__version__ = \"\1\"/" rebaler/__main__.py sed -i "s#rebaler/rebaler.py#rebaler/__main__.py#g" setup.py python3 setup.py # or via pip

jowodo avatar Jul 21 '21 15:07 jowodo