mggg / VoteKit

A Swiss Army Knife for computational social choice research
https://votekit.readthedocs.io/en/latest/
MIT License
11 stars 13 forks source link

distinctipy module not loaded #74

Closed gabeschoenbach closed 1 year ago

gabeschoenbach commented 1 year ago

When trying to run some of the code in test_graph.py, I get the following error when running from votekit.graphs.models import BallotGraph:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 from votekit.graphs.models import BallotGraph
      2 from votekit.profile import PreferenceProfile
      3 from votekit.ballot import Ballot

File ~/Desktop/mggg/summer23/VoteKit/src/votekit/graphs/models.py:4
      2 from typing import Callable, Optional, Union, Any
      3 from abc import ABC, abstractmethod
----> 4 from distinctipy import get_colors  # type: ignore
      5 import networkx as nx  # type: ignore
      6 from functools import cache

ModuleNotFoundError: No module named 'distinctipy'

I tried running !pip install distinctipy and restarting, but the error persists. Should distinctipy somehow be loaded in when we do the poetry stuff?

jamesturk commented 1 year ago

distinctipy is definitely in the pyproject.toml, did you run poetry install? It it installed within the virtualenv?

Also, never use pip directly like that, it installs to your system Python & will cause real headaches!

jgibson517 commented 1 year ago

distinctipy has been removed now that votekit uses MGGG standard colors!