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

Error importing polaris on MacOS #164

Open
PatWalters opened this issue Jul 29, 2024 · 4 comments
Open

Error importing polaris on MacOS #164

PatWalters opened this issue Jul 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@PatWalters
Copy link

Polaris version

dev

Python Version

3.11.3

Operating System

MacOS

Installation

mamba install -c conda-forge polaris

Description

>>> import polaris as po
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/polaris/__init__.py", line 7, in 
    from .loader import load_benchmark, load_dataset
  File "/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/polaris/loader/__init__.py", line 1, in 
    from .load import load_benchmark, load_dataset
  File "/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/polaris/loader/load.py", line 6, in 
    from polaris.benchmark._definitions import (
  File "/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/polaris/benchmark/__init__.py", line 1, in 
    from polaris.benchmark._base import BenchmarkSpecification
  File "/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/polaris/benchmark/_base.py", line 11, in 
    from pydantic import (
ImportError: cannot import name 'ValidationInfo' from 'pydantic' (/Users/pwalters/miniconda3/envs/rdkit_2023_05/lib/python3.11/site-packages/pydantic/__init__.cpython-311-darwin.so)
>>>

Steps to reproduce

import polaris as po

Additional output

No response

@PatWalters PatWalters added the bug Something isn't working label Jul 29, 2024
@PatWalters
Copy link
Author

This may have been a function of the conda environment I was working in. I created a new conda environment and was able to successfully install polaris-lib.

@Andrewq11
Copy link
Contributor

Thanks for submitting this and following up, @PatWalters. I do believe it could be related to the version of pydantic you have installed in your rdkit_2023_05 conda environment. Would you mind sharing what that version was?

We should update the polaris environment spec to only accept pydantic versions which expose the ValidationInfo class.

@PatWalters
Copy link
Author

Python 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:58:31) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pydantic
pydantic.version
'1.10.13'

@Andrewq11
Copy link
Contributor

Thanks! Conda should be throwing an error here about dependency conflicts based on the versioning we already specify for the polaris environment. We'll dig into this a bit further and keep this issue open until we have a more concrete explanation.

Thanks for the help!

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

2 participants