Coder Social home page Coder Social logo

Python error (?) about maxfield HOT 9 CLOSED

elkuku avatar elkuku commented on June 25, 2024
Python error (?)

from maxfield.

Comments (9)

Sukhumi avatar Sukhumi commented on June 25, 2024

Had the same issue, downgrade ortools and install again:
sudo pip install ortools==8.2.8710

from maxfield.

elkuku avatar elkuku commented on June 25, 2024

Had the same issue, downgrade ortools and install again: sudo pip install ortools==8.2.8710

Wow that sounds like a plan :)
Unfortunally just copy and pasting the command gave me the following result:

$ sudo pip install ortools==8.2.8710
ERROR: Could not find a version that satisfies the requirement ortools==8.2.8710
ERROR: No matching distribution found for ortools==8.2.8710

OK let's investigate in Python land... ortools from google... the version you mention seems to be this one and looking at the assets, the version numer seems to be right, so... no typo...
let's find out the available versions... search the web, found a SO answer that tells me that there are actually five different ways to do this, depending on your pip version... for my version (21.0) teh command seems to be:
pip install --use-deprecated=legacy-resolver ortools==- sounds awesome...
The result was:

$ sudo pip install --use-deprecated=legacy-resolver ortools==
ERROR: Could not find a version that satisfies the requirement ortools== (from versions: 9.1.9490, 9.2.9972, 9.3.10459, 9.3.10497)
ERROR: No matching distribution found for ortools==

So it seems that the 8.2 version is no longer available for pip installation?
Is there any other way to downgrade this lib?

Thanks ;)

from maxfield.

tvwenger avatar tvwenger commented on June 25, 2024

Hey all - sorry for the long delay in responding to this!

I am able to reproduce the error with ortools, and I have submitted an issue with them: google/or-tools#3202

I was able to run maxfield by installing an older version of ortools like @Sukhumi suggested.

@elkuku make sure you're using the latest pip:

(maxfieldenv) (base) 
[09:58:51 twenger@Jansky:~/maxfield/example]
$ pip install --upgrade pip
Requirement already satisfied: pip in /home/twenger/maxfieldenv/lib/python3.9/site-packages (22.0.4)
(maxfieldenv) (base) 
[09:58:56 twenger@Jansky:~/maxfield/example]
$ pip index versions ortools
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
ortools (9.3.10497)
Available versions: 9.3.10497, 9.3.10459, 9.2.9972, 9.1.9490, 9.0.9048, 8.2.8710, 8.1.8487, 8.0.8283, 7.8.7959
  INSTALLED: 8.2.8710
  LATEST:    9.3.10497
(maxfieldenv) (base) 
[09:59:03 twenger@Jansky:~/maxfield/example]
$ pip install ortools==8.2.8710
Requirement already satisfied: ortools==8.2.8710 in /home/twenger/maxfieldenv/lib/python3.9/site-packages (8.2.8710)
Requirement already satisfied: protobuf>=3.14.0 in /home/twenger/maxfieldenv/lib/python3.9/site-packages/protobuf-4.0.0rc2-py3.9.egg (from ortools==8.2.8710) (4.0.0rc2)
Requirement already satisfied: absl-py>=0.11 in /home/twenger/maxfieldenv/lib/python3.9/site-packages/absl_py-1.0.0-py3.9.egg (from ortools==8.2.8710) (1.0.0)
Requirement already satisfied: six in /home/twenger/maxfieldenv/lib/python3.9/site-packages/six-1.16.0-py3.9.egg (from absl-py>=0.11->ortools==8.2.8710) (1.16.0)
Requirement already satisfied: setuptools in /home/twenger/maxfieldenv/lib/python3.9/site-packages (from protobuf>=3.14.0->ortools==8.2.8710) (57.4.0)

from maxfield.

tvwenger avatar tvwenger commented on June 25, 2024

Force older version of ortools: ce59604

from maxfield.

elkuku avatar elkuku commented on June 25, 2024
$ sudo pip install --upgrade pip
[sudo] Passwort für elkuku: 
Requirement already satisfied: pip in /usr/lib/python3.10/site-packages (21.0)
Collecting pip
  Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 701 kB/s            
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.0
    Uninstalling pip-21.0:
      Successfully uninstalled pip-21.0
Successfully installed pip-22.0.4
~/r/m/example (master|✚60…) $ pip index versions ortools
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
ortools (9.3.10497)
Available versions: 9.3.10497, 9.3.10459, 9.2.9972, 9.1.9490
  INSTALLED: 9.3.10497
  LATEST:    9.3.10497

:(

Anything else that I might update?

Maybe a local caching issue?.....

from maxfield.

elkuku avatar elkuku commented on June 25, 2024

Force older version of ortools: ce59604

~/r/maxfield (master|✚60…) $ git pull
Von https://github.com/tvwenger/maxfield
   8fdfabf..ce59604  master     -> origin/master
 README.md | 3 +++
 setup.py  | 2 +-

 
~/r/maxfield (master|✚60…) [1]$ sudo python setup.py install
running install
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing maxfield.egg-info/PKG-INFO
writing dependency_links to maxfield.egg-info/dependency_links.txt
writing requirements to maxfield.egg-info/requires.txt
writing top-level names to maxfield.egg-info/top_level.txt
reading manifest file 'maxfield.egg-info/SOURCES.txt'
adding license file 'LICENSE.md'
writing manifest file 'maxfield.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying maxfield/field.py -> build/lib/maxfield
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/field.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/geometry.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/maxfield.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/fielder.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/router.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/reorder.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/generator.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/__init__.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/plan.py -> build/bdist.linux-x86_64/egg/maxfield
copying build/lib/maxfield/results.py -> build/bdist.linux-x86_64/egg/maxfield
byte-compiling build/bdist.linux-x86_64/egg/maxfield/field.py to field.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/geometry.py to geometry.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/maxfield.py to maxfield.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/fielder.py to fielder.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/router.py to router.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/reorder.py to reorder.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/generator.py to generator.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/__init__.py to __init__.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/plan.py to plan.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/maxfield/results.py to results.cpython-310.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.10/maxfield-plan -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/maxfield-plan to 755
copying maxfield.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying maxfield.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying maxfield.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying maxfield.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying maxfield.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/maxfield-4.0-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing maxfield-4.0-py3.10.egg
Removing /usr/lib/python3.10/site-packages/maxfield-4.0-py3.10.egg
Copying maxfield-4.0-py3.10.egg to /usr/lib/python3.10/site-packages
maxfield 4.0 is already the active version in easy-install.pth
Installing maxfield-plan script to /usr/bin

Installed /usr/lib/python3.10/site-packages/maxfield-4.0-py3.10.egg
Processing dependencies for maxfield==4.0
Searching for ortools==8.2.8710
Reading https://pypi.org/simple/ortools/
/usr/lib/python3.10/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release
  warnings.warn(
No local packages or working download links found for ortools==8.2.8710
error: Could not find suitable distribution for Requirement.parse('ortools==8.2.8710')

Seems like something is not compatible with another something...

from maxfield.

tvwenger avatar tvwenger commented on June 25, 2024

Hmmm... I wonder if this is a python version problem? I'm using 3.9 and you're using 3.10. Maybe ortools 8.x isn't supported in python 3.10 considering it doesn't show up in your pip index... Worth a shot trying 3.9 in a virtual environment and seeing what happens!

from maxfield.

elkuku avatar elkuku commented on June 25, 2024

Worth a shot trying 3.9 in a virtual environment and seeing what happens!

After an hour or so I have to confess, that this is not an easy task :(

from maxfield.

tvwenger avatar tvwenger commented on June 25, 2024

Alright, it looks like the problem with ortools is a dependency issue with another package, protobuf.

google/or-tools#3202

Fix incoming...

from maxfield.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.