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

Incompatibility with newest GeoPandas #557

Closed
k-a-mendoza opened this issue Jan 2, 2024 · 11 comments
Closed

Incompatibility with newest GeoPandas #557

k-a-mendoza opened this issue Jan 2, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@k-a-mendoza
Copy link

I'm having some issues installing jupyter via the conda-forge channel into one of my virtualenvs. Firstly, it appears conda can't find the conda install -c conda-forge jupyter_ai recipe, but conda install -c conda-forge jupyter-ai works. However, when it does find an install plan, it appears as though it has to downgrade Geopandas 0.14 to 0.13 to satisfy dependencies. I suspect this has to do with incompatibilities with Shapely? In any case this is a shame. If this is a hard dependency graph to solve, I'll have to wait for a few more iterations of jupyter-ai to use it for my current stack.

@k-a-mendoza k-a-mendoza added the bug Something isn't working label Jan 2, 2024
Copy link

welcome bot commented Jan 2, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link
Collaborator

@k-a-mendoza Thank you for opening this! I'm surprised by the effect on geopandas, since neither jupyter_ai nor jupyter_ai_magics should be dependent on geopandas. Using conda-tree, as explained in this StackOverflow answer, can you see what dependencies from jupyter_ai affect geopandas?

As for the name, Conda's package name for Jupyter AI is jupyter-ai; the Python package name, used in Pip and PyPI, is jupyter_ai.

@k-a-mendoza
Copy link
Author

Very Strange. The conda error appears to indicate there is a system incompatibility (M1 Mac). I did make tree dependency files from clean environments with geopandas > 0.14 and jupyter-ai, but no single dependency appeared to pop out.

Heres the message I get when attempting to install geopandas after first installing jupyter-ai.

I can attach the full dependency tree graphs for each if it might help.

`The following specifications were found to be incompatible with your system:

  • feature:/osx-64::__osx==13.6.1=0
  • feature:/osx-64::__unix==0=0
  • feature:|@/osx-64::__osx==13.6.1=0
  • feature:|@/osx-64::__unix==0=0
  • click -> __unix
  • click -> __win
  • contourpy -> __osx[version='>=10.9']
  • dask-core -> click[version='>=8.1'] -> __unix
  • dask-core -> click[version='>=8.1'] -> __win
  • distributed -> click[version='>=8.0'] -> __unix
  • distributed -> click[version='>=8.0'] -> __win
  • distributed -> msgpack-python[version='>=1.0.0'] -> __osx[version='>=10.9']
  • faiss -> numpy[version='>=1.21.6,<2.0a0'] -> __osx[version='>=10.9']
  • geopandas=0.14 -> fiona[version='>=1.8.21'] -> __osx[version='>=10.11|>=10.12|>=10.9']
  • google-api-core -> protobuf[version='>=3.19.5,<5.0.0.dev0,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5'] -> __osx[version='>=10.13|>=10.9']
  • googleapis-common-protos -> protobuf[version='>=3.19.5,<5.0.0dev0,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5'] -> __osx[version='>=10.13|>=10.9']
  • greenlet -> __osx[version='>=10.9']
  • ipykernel -> __linux
  • ipykernel -> __osx
  • ipykernel -> __win
  • ipykernel -> ipython[version='>=7.23.1'] -> __unix
  • ipykernel -> pyzmq[version='>=24'] -> __osx[version='>=10.9']
  • ipython -> __linux
  • ipython -> __osx
  • ipython -> __unix
  • ipython -> __win
  • jupyter-ai -> tiktoken -> __osx[version='>=10.9']
  • jupyter-ai-magics -> click[version='>=8.0,<9.dev0'] -> __unix
  • jupyter-ai-magics -> click[version='>=8.0,<9.dev0'] -> __win
  • jupyter-ai-magics -> ipython -> __linux
  • jupyter-ai-magics -> ipython -> __osx
  • jupyter_client -> pyzmq[version='>=23.0'] -> __osx[version='>=10.9']
  • jupyter_server -> pyzmq[version='>=24'] -> __osx[version='>=10.9']
  • jupyter_server -> send2trash[version='>=1.8.2'] -> __linux
  • jupyter_server -> send2trash[version='>=1.8.2'] -> __win
  • jupyter_server_terminals -> terminado[version='>=0.8.3'] -> __linux
  • jupyter_server_terminals -> terminado[version='>=0.8.3'] -> __osx
  • jupyter_server_terminals -> terminado[version='>=0.8.3'] -> __win
  • jupyterlab -> ipykernel -> __linux
  • jupyterlab -> ipykernel -> __osx
  • jupyterlab -> ipykernel -> __win
  • jupyterlab -> ipython -> __unix
  • langchain -> numexpr[version='>=2.8.4,<3.0.0'] -> __osx[version='>=10.9']
  • langchain-community -> numpy[version='>=1.0.0,<2.0.0'] -> __osx[version='>=10.9']
  • libprotobuf -> __osx[version='>=10.13|>=10.9']
  • matplotlib-base -> __osx[version='>=10.11|>=10.12|>=10.9']
  • matplotlib-inline -> ipython -> __linux
  • matplotlib-inline -> ipython -> __osx
  • matplotlib-inline -> ipython -> __unix
  • matplotlib-inline -> ipython -> __win
  • msgpack-python -> __osx[version='>=10.9']
  • ncurses -> __osx[version='>=10.9']
  • numexpr -> __osx[version='>=10.9']
  • numpy -> __osx[version='>=10.9']
  • openai -> matplotlib-base -> __osx[version='>=10.11|>=10.12|>=10.9']
  • pandas -> __osx[version='>=10.9']
  • pandas-stubs -> numpy[version='>=1.26.0'] -> __osx[version='>=10.9']
  • protobuf -> __osx[version='>=10.13|>=10.9']
  • pysocks -> __unix
  • pysocks -> __win
  • python=3.11 -> ncurses[version='>=6.4,<7.0a0'] -> __osx[version='>=10.9']
  • pyyaml -> cython -> __osx[version='>=10.9']
  • pyzmq -> __osx[version='>=10.9']
  • readline -> ncurses[version='>=6.3,<7.0a0'] -> __osx[version='>=10.9']
  • scikit-learn -> __osx[version='>=10.9']
  • scipy -> __osx[version='>=10.9']
  • send2trash -> __linux
  • send2trash -> __osx
  • send2trash -> __win
  • sqlalchemy -> greenlet!=0.4.17 -> __osx[version='>=10.9']
  • terminado -> __linux
  • terminado -> __osx
  • terminado -> __win
  • tiktoken -> __osx[version='>=10.9']
  • urllib3 -> pysocks[version='>=1.5.6,<2.0,!=1.5.7'] -> __unix
  • urllib3 -> pysocks[version='>=1.5.6,<2.0,!=1.5.7'] -> __win
  • wandb -> click[version='>=7.1,!=8.0.0'] -> __unix
  • wandb -> click[version='>=7.1,!=8.0.0'] -> __win
  • wandb -> protobuf[version='>=3.19.0,!=4.21.0,<5'] -> __osx[version='>=10.13|>=10.9']
  • zeromq -> __osx[version='>=10.9']

Your installed version is: 0
`

@JasonWeill
Copy link
Collaborator

When I have jupyter-ai installed on my laptop (Apple Silicon), and I run conda install geopandas, I'm offered 0.13.2. When I don't have jupyter-ai installed, and I run conda install geopandas, I'm offered version 0.9.0. Without jupyter-ai installed, I can run conda install geopandas=0.14.0 and I can install the newer version. Then, when I run conda install jupyter-ai, I get an error about a conflict involving langchain. Note that jupyter-ai-2.2.0, an older version, has been selected in the excerpt below, but jupyter-ai 2.8.x uses LangChain 0.0.350, which also requires geopandas >=0.13.1,<0.14.0.

$ conda install jupyter-ai
Channels:
 - defaults                                                                         
 - conda-forge                                                                      
Platform: osx-arm64                                                                 
Collecting package metadata (repodata.json): done                                   
Solving environment: failed                                                         
                                                                                    
LibMambaUnsatisfiableError: Encountered problems while solving:                     
  - package jupyter-ai-2.2.0-pyhd8ed1ab_0 requires langchain 0.0.277, but none of the providers can be installed                                                        
                                                                                    
Could not solve for environment specs                                               
The following packages are incompatible                                             
├─ geopandas 0.14.0**  is requested and can be installed;                           
└─ jupyter-ai is not installable because it requires                                
   └─ langchain [0.0.277 |0.0.308 |0.0.318 |0.0.346 |0.0.350 ], which requires      
      └─ geopandas >=0.13.1,<0.14.0 , which conflicts with any installable versions previously reported.                                                           

In LangChain's source tree, I see libs/community/pyproject.toml locks geopandas to ^0.13.1:

https://github.com/langchain-ai/langchain/blob/75281af8224acb2d565a005038fa1f658ba591ab/libs/community/pyproject.toml#L61

What needs to happen for this to be fixed, in order:

  1. LangChain needs to depend on a newer geopandas version.
  2. Jupyter AI needs to depend on a newer version of LangChain.

@k-a-mendoza I didn't see geopandas mentioned in any of LangChain's issues. Can you please open a new issue on their repo, and mention this one in your new issue? Thanks!

@JasonWeill JasonWeill added the status:Blocked Requires another task to be completed label Jan 5, 2024
@k-a-mendoza
Copy link
Author

@JasonWeill sure thing.

@JasonWeill
Copy link
Collaborator

JasonWeill commented Jan 18, 2024

Jupyter AI, as of the tip of main, now does depend on a newer version of LangChain, 0.1.0. See #572. We will release a newer version of Jupyter AI to PyPi and Conda Forge as soon as we can.

@JasonWeill
Copy link
Collaborator

The newer LangChain dependency is now available in Jupyter AI v2.9.1.

@JasonWeill
Copy link
Collaborator

I was able to use pip to install Jupyter AI 2.9.1 and also Geopandas 0.14.2. Closing this issue. Thank you for your contribution!

@JasonWeill JasonWeill removed the status:Blocked Requires another task to be completed label Jan 24, 2024
@scottyhq
Copy link

Hi! I ran into this today trying to install jupyter-ai & geopandas in the same environment with mamba on linux-64, so I think it should be reopened (I commented also on the langchain issue linked above)

The following packages are incompatible
├─ geopandas >=1.0  is requested and can be installed;
├─ jupyter-ai ~=2.9.1  is not installable because it requires
│  └─ jupyter-ai-magics 2.9.1 , which requires
│     └─ langchain-community >0.0.8,<=0.1.0 , which requires
│        └─ geopandas >=0.13.1,<0.14.0 , which conflicts with any installable versions previously reported;

@JasonWeill
Copy link
Collaborator

@scottyhq Have you tried this with a newer version of Jupyter AI? As of version 2.20.0, we depend on langchain_community>=0.1.0,<0.3.0, and langchain_community version 0.2.10 supports newer versions of geopandas.

@scottyhq
Copy link

@scottyhq Have you tried this with a newer version of Jupyter AI?

Indeed! Apologies for not checking against the most recent released version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants