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

ISR Dependency functools32 Fails Install using Poetry #232

Open
johnziebro opened this issue Jul 12, 2022 · 2 comments
Open

ISR Dependency functools32 Fails Install using Poetry #232

johnziebro opened this issue Jul 12, 2022 · 2 comments

Comments

@johnziebro
Copy link

While getting requirements to build wheel for functools32, Poetry throws an error stating "This backport is for Python 2.7 only."

I've searched the issues and have not found any regarding functools32. Is there a workaround? Thank you.

Poetry's pyproject.toml:

[tool.poetry]
name = "Imgovore-SuperScaler"
version = "0.1.0"
description = ""
authors = ["anon <anon@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9.13"
httpx = "^0.23.0"
ISR = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Error message:

  • Installing functools32 (3.2.3-2): Failed

  CalledProcessError

  Command '['/media/anon/36782A484452D4B2/Projects/dalleflow/.venv/bin/python', '/home/anon/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/media/anon/36782A484452D4B2/Projects/dalleflow/.venv', '--no-deps', '/home/anon/.cache/pypoetry/artifacts/40/ec/4a/429967dd7cfd0d2348afa71339ab609621377e44b77bc9be27e030b55e/functools32-3.2.3-2.tar.gz']' returned non-zero exit status 1.

  at /usr/lib/python3.10/subprocess.py:524 in run
       520│             # We don't call process.wait() as .__exit__ does that for us.
       521│             raise
       522│         retcode = process.poll()
       523│         if check and retcode:
    →  524│             raise CalledProcessError(retcode, process.args,
       525│                                      output=stdout, stderr=stderr)
       526│     return CompletedProcess(process.args, retcode, stdout, stderr)
       527│ 
       528│ 

The following error occurred when trying to handle this error:


  EnvCommandError

  Command ['/media/anon/36782A484452D4B2/Projects/dalleflow/.venv/bin/python', '/home/anon/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/media/anon/36782A484452D4B2/Projects/dalleflow/.venv', '--no-deps', '/home/anon/.cache/pypoetry/artifacts/40/ec/4a/429967dd7cfd0d2348afa71339ab609621377e44b77bc9be27e030b55e/functools32-3.2.3-2.tar.gz'] errored with the following return code 1, and output: 
  Processing /home/anon/.cache/pypoetry/artifacts/40/ec/4a/429967dd7cfd0d2348afa71339ab609621377e44b77bc9be27e030b55e/functools32-3.2.3-2.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [1 lines of output]
        This backport is for Python 2.7 only.
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1497 in _run
      1493│                 output = subprocess.check_output(
      1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1495│                 )
      1496│         except CalledProcessError as e:
    → 1497│             raise EnvCommandError(e, input=input_)
      1498│ 
      1499│         return decode(output)
      1500│ 
      1501│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install /home/anon/.cache/pypoetry/artifacts/40/ec/4a/429967dd7cfd0d2348afa71339ab609621377e44b77bc9be27e030b55e/functools32-3.2.3-2.tar.gz

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
       51│ 
       52│     try:
       53│         return environment.run_pip(*args)
       54│     except EnvCommandError as e:
    →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       56│ 

Poetry config:

Poetry-version = 1.2.0b2
cache-dir = "/home/anon/.cache/pypoetry"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.no-binary = null
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/anon/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = true
virtualenvs.prompt = "{project_name}-py{python_version}"
@johnziebro
Copy link
Author

johnziebro commented Jul 12, 2022

In a similar manner installation of ISR using Pipenv fails. In this case it is due to a dependency of Tensorflow version missing.

pipenv install "ISR>=2.2.0" --python 3.9.13

pipenv install "ISR>=2.2.0" --python 3.9.13
Creating a virtualenv for this project...
Pipfile: /media/anon/36782A484452D4B2/Projects/dalleflow/Pipfile
Using /home/anon/.pyenv/versions/3.9.13/bin/python3.9 (3.9.13) to create virtualenv...
⠦ Creating virtual environment...created virtual environment CPython3.9.13.final.0-64 in 429ms
  creator CPython3Posix(dest=/media/anon/36782A484452D4B2/Projects/dalleflow/.venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/anon/.local/share/virtualenv)
    added seed packages: pip==22.1.2, setuptools==62.6.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /media/anon/36782A484452D4B2/Projects/dalleflow/.venv
Creating a Pipfile for this project...
Installing ISR>=2.2.0...
Error:  An error occurred while installing ISR>=2.2.0!
Error text: Collecting isr>=2.2.0
  Using cached ISR-2.2.0-py3-none-any.whl (33 kB)
Collecting numpy
  Using cached numpy-1.23.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)

ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0 (from isr) (from versions: 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1)
ERROR: No matching distribution found for tensorflow==2.0.0

✘ Installation Failed 

@johnziebro
Copy link
Author

Possibly linked to Merge Request 22: [FIX] Fixed Dependency issue when installing ISR package using pip

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

1 participant