Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Venv installation failure #15

Open
Datise opened this issue Feb 3, 2021 · 4 comments
Open

Venv installation failure #15

Datise opened this issue Feb 3, 2021 · 4 comments

Comments

@Datise
Copy link

Datise commented Feb 3, 2021

Hi I was attempting to install the tool using venv but ran into this:

➜  aiven-db-migrate git:(master) ✗ python3 -m venv venv
➜  aiven-db-migrate git:(master) ✗ . venv/bin/activate
(venv) ➜  aiven-db-migrate git:(master) ✗ pip install .
Processing /Users/djb/work/aiven-db-migrate
    ERROR: Command errored out with exit status 1:
     command: /Users/djb/work/aiven-db-migrate/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-req-build-nv63xi38/setup.py'"'"'; __file__='"'"'/private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-req-build-nv63xi38/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 /private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-pip-egg-info-w48lrc8g
         cwd: /private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-req-build-nv63xi38/
    Complete output (16 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-req-build-nv63xi38/setup.py", line 31, in <module>
        version=get_version(),
      File "/private/var/folders/zm/4bd70yhx4m1drjwxpfd7pd_40000gn/T/pip-req-build-nv63xi38/setup.py", line 10, in get_version
        return SourceFileLoader("version", "aiven_db_migrate/migrate/version.py").load_module().__version__
      File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 962, in load_module
      File "<frozen importlib._bootstrap_external>", line 787, in load_module
      File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 702, in _load
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 779, in exec_module
      File "<frozen importlib._bootstrap_external>", line 915, in get_code
      File "<frozen importlib._bootstrap_external>", line 972, in get_data
    FileNotFoundError: [Errno 2] No such file or directory: 'aiven_db_migrate/migrate/version.py'
    ----------------------------------------

Apologies if I'm missing something, I don't really have python experience.

@ansrivas
Copy link

ansrivas commented Feb 7, 2021

@Datise Thanks for reporting this.
Can you try to run the following commands?

$ python3 -m venv venv
$ . venv/bin/activate
$ ## Run make to automatically generate the version info from git-tag
$ make
$ pip install .

NOTE: In case the process fails at psycopg2 installation stage, please also run pip install psycopg2-binary==2.8.6

@Datise
Copy link
Author

Datise commented Feb 10, 2021

Thanks for the help @ansrivas .
I have run into installing psycopg2 and the suggestion doesn't resolve it. I'll did into it when I have time next week.

@kedare
Copy link

kedare commented Jun 22, 2022

The problem is still current.

setup.py tries to import aiven_db_migrate/migrate/version.pythat doesn't exist in the repository.

Make need to be run to generate it, maybe it would be interesting to add a warning when running setup.py with this file missing ?

@DimKouts84
Copy link

I can confirm that this:

setup.py tries to import aiven_db_migrate/migrate/version.py that doesn't exist in the repository.

Remains an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants