Comments (4)
When integrating Algolia with a new Django project, this issue becomes a stumbling block. Attempting to use both the Django integration and the latest python client is impossible.
To reproduce using pipenv
Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
algoliasearch = "<3,>=2.0"
algoliasearch-django = "*"
[requires]
python_version = "3.8"
Install
$ pipenv install
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Building requirements...
Resolving dependencies...
✘ Locking Failed!
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py", line 785, in _main
[ResolutionFailure]: resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py", line 746, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py", line 728, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py", line 1378, in resolve_deps
[ResolutionFailure]: results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py", line 1093, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py", line 818, in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches algoliasearch<2.0,<3,>=1.0,>=2.0 (from -r /var/folders/s1/m_gbk3p11w73b8qfb26xsd6w0000gn/T/pipenv2wgjhw78requirements/pipenv-qvpi1fn4-constraints.txt (line 3))
Tried: 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.2.10, 1.2.11, 1.2.12, 1.2.13, 1.2.14, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.6, 1.5.7, 1.5.7, 1.5.8, 1.5.8, 1.5.9, 1.5.9, 1.6.1, 1.6.1, 1.6.2, 1.6.2, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.6.5, 1.6.6, 1.6.6, 1.6.7, 1.6.8, 1.7.0, 1.7.1, 1.8.0, 1.8.0, 1.9.0, 1.9.0, 1.9.1, 1.9.1, 1.9.2, 1.9.2, 1.10.0, 1.10.0, 1.11.0, 1.11.0, 1.11.2, 1.11.2, 1.11.3, 1.11.3, 1.12.0, 1.12.0, 1.13.0, 1.13.0, 1.14.0, 1.14.0, 1.14.1, 1.14.1, 1.15.0, 1.15.0, 1.15.2, 1.15.2, 1.15.3, 1.15.3, 1.16.0, 1.16.0, 1.17.0, 1.17.0, 1.18.0, 1.18.0, 1.18.1, 1.18.1, 1.19.0, 1.19.0, 1.19.1, 1.19.1, 1.20.0, 1.20.0, 2.0.0, 2.0.0, 2.0.1, 2.0.1, 2.0.2, 2.0.2, 2.0.3, 2.0.3, 2.0.4, 2.0.4, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.1, 2.3.1, 2.4.0, 2.4.0
Skipped pre-versions: 2.0.0b1, 2.0.0b1, 2.0.0b2, 2.0.0b2, 2.0.0b3, 2.0.0b3, 2.0.0b4, 2.0.0b4, 2.0.0b5, 2.0.0b5
There are incompatible versions in the resolved dependencies:
algoliasearch<3,>=2.0 (from -r /var/folders/s1/m_gbk3p11w73b8qfb26xsd6w0000gn/T/pipenv2wgjhw78requirements/pipenv-qvpi1fn4-constraints.txt (line 3))
algoliasearch<2.0,>=1.0 (from algoliasearch-django==1.7.2->-r /var/folders/s1/m_gbk3p11w73b8qfb26xsd6w0000gn/T/pipenv2wgjhw78requirements/pipenv-qvpi1fn4-constraints.txt (line 2))
from algoliasearch-django.
I see that this change has been merged, but when installing latest version of algoliasearch-django (1.7.3) I still get an old version of algoliasearch library (1.20.0)
Am I missing something?
pip install algoliasearch-django --no-cache-dir
Collecting algoliasearch-django
Downloading algoliasearch_django-1.7.3-py2.py3-none-any.whl (18 kB)
Collecting algoliasearch<2.0,>=1.0
Downloading algoliasearch-1.20.0-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: django>=1.7 in ./venv-3.6.7/lib/python3.6/site-packages (from algoliasearch-django) (2.1.5)
Requirement already satisfied: requests>=2.9.1 in ./venv-3.6.7/lib/python3.6/site-packages (from algoliasearch<2.0,>=1.0->algoliasearch-django) (2.21.0)
Requirement already satisfied: pytz in ./venv-3.6.7/lib/python3.6/site-packages (from django>=1.7->algoliasearch-django) (2018.9)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv-3.6.7/lib/python3.6/site-packages (from requests>=2.9.1->algoliasearch<2.0,>=1.0->algoliasearch-django) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./venv-3.6.7/lib/python3.6/site-packages (from requests>=2.9.1->algoliasearch<2.0,>=1.0->algoliasearch-django) (2018.11.29)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./venv-3.6.7/lib/python3.6/site-packages (from requests>=2.9.1->algoliasearch<2.0,>=1.0->algoliasearch-django) (1.24.1)
Requirement already satisfied: idna<2.9,>=2.5 in ./venv-3.6.7/lib/python3.6/site-packages (from requests>=2.9.1->algoliasearch<2.0,>=1.0->algoliasearch-django) (2.6)
Installing collected packages: algoliasearch, algoliasearch-django
Successfully installed algoliasearch-1.20.0 algoliasearch-django-1.7.3
Also tried pip install directly from master branch and got the same result.
from algoliasearch-django.
Hi @augustosamame , indeed it's an error on our part, the library is not ready yet to handle the v2 of the client. Sorry for the confusion
from algoliasearch-django.
I forked the algoliasearch-django library and changed the algoliasearch library versions in setup.py to force it to install the newest algoliasearch library:
but I now get this error even when starting the shell:
ImportError: cannot import name 'AlgoliaException'
so yeah it seems it's not compatible at all.
Is there any chance this will be fixed soon? We've completed our Django integration and now we find we cannot search!
The raw_search
function doesn't seem to have the ability to hit the replica indexes to get alternate sorting orders.
Is there any way we can hit the replica indexes with older algoliasearch library or raw_search ? Of course we'd still need filtering, faceting and pagination to work.
from algoliasearch-django.
Related Issues (20)
- Algolia reindex script tmp index move takes a long time. HOT 1
- Auto camel casing with Graphene HOT 1
- register decorator not working HOT 2
- disable indexing decorator not working HOT 2
- How to sorted replicas_index dynamic? HOT 3
- Containerize repository
- algoliasearch v1.20.0 still targeted as a dependency HOT 2
- Auto indexing when related model is changed HOT 3
- upon reindexing the main index overwrites its replica configurations - this behaviour should made configurable as it might be undesired
- which version start supporting django32 HOT 1
- Django algolia search: How to create search for multiple models HOT 4
- Unknown command: 'algolia_reindex' HOT 1
- How to put several models in one index HOT 1
- Preserve field names after preprocessing a field
- Support Multiple Algolia applications in one Django project
- Mapping Django and Algolia fields name
- Python 3.11 Support HOT 1
- Add support for Django 4.x series HOT 2
- Indexing take too much memory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algoliasearch-django.