aceazycrdfz / pyvoting

a voting framework with implementations of many voting algorithms
GNU General Public License v3.0
1 stars 2 forks source link

I cannot import the version on PyPI #3

Open sinan-ozel opened 2 months ago

sinan-ozel commented 2 months ago

I try to import:

import pyvoting
import pandas as pd

I get the following error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-f62535c24f9c> in <module>
----> 1 import pyvoting
      2 import pandas as pd

C:\WPy64-3850\python-3.8.5.amd64\lib\site-packages\pyvoting\__init__.py in <module>
      1 from .Voting import Voting
----> 2 from .PluralityVoting import PluralityVoting
      3 from .ApprovalVoting import ApprovalVoting
      4 from .ScoreVoting import ScoreVoting
      5 from .STARVoting import STARVoting

C:\WPy64-3850\python-3.8.5.amd64\lib\site-packages\pyvoting\PluralityVoting.py in <module>
      4 import pandas as pd
      5 import numpy as np
----> 6 from Voting import Voting
      7 
      8 class PluralityVoting(Voting):

ModuleNotFoundError: No module named 'Voting'

A quick check shows that all of the relevant files are actually there - so I am not sure why Python refuses to import.

Note that this is a "WinPython", so it is on a WIndows machine. I

aceazycrdfz commented 2 months ago

It seems I used relative imports here, which might not be a good design choice. I swear I will address this this weekend!!!

aceazycrdfz commented 2 months ago

I merged a pull request by someone else that fixes it, but right now it is not on PyPI yet. Will upload to pypi along with some polishing!

aceazycrdfz commented 2 months ago

I have updated 1.0.4 on PyPI. Does it work now? Sorry about this