ml-research / rational_activations

Rational Activation Functions - Replacing Padé Activation Units
MIT License
77 stars 17 forks source link

setup.py returns TypeError: module() takes at most 2 arguments (3 given) #19

Closed AliKalsen closed 3 years ago

AliKalsen commented 3 years ago

Hi,

when running the command

python3 setup.py install --user,

I receive the error described above at line 137 in the setup.py file. I wasn't able to fix this problem on my own. Maybe you guys can help me out.

k4ntz commented 3 years ago

Hey I don't see the description of your error, could you paste it here please ?

AliKalsen commented 3 years ago

Did I actually run the correct command?

Traceback (most recent call last): File "setup.py", line 138, in <module> class clean_all(clean): TypeError: module() takes at most 2 arguments (3 given)

Discussions on this error in different forums concluded that this error occurs due to the fact that this class inherits from a module, which should be circumvented.

k4ntz commented 3 years ago

Could you do pip3 list ? To check if the rational modules was installed ? And then run python3 -c "from rational.torch import Rational; print(Rational())"

k4ntz commented 3 years ago

What python version are you using? For me, clean imported by line 4 (from distutils.command.clean import clean) is a class, so I don't get this error.

AliKalsen commented 3 years ago

Python 3.8.5

k4ntz commented 3 years ago

Otherwise you could replace the clean_all class by :

class clean_all():
    def run(self):
        pass

As clean is anyhow not called by setup.py install

AliKalsen commented 3 years ago

Replacing the clean_all method just worked fine. Thanks for the fast reply. BTW I didn't know that it is possible to install the package from PyCharm.

k4ntz commented 3 years ago

Top ! No problem ! I close the issue then :)