TypeError: __init__() takes exactly 2 arguments: python-crontab

229
December 26, 2017, at 7:48 PM

I tried to use python-crontab in my module library. What I did: - I installed pip with my homebrew package manager with the command:

brew install pip

After that I was just able to use it with the command 'pip2' instead of 'pip'. With pip I installed python-crontab with

pip2 python-crontab

From documetation I read that this error:

TypeError: __init__() takes exactly 2 arguments

is produced when to use the wrong version of python-crontab.

I get this error and after that I checked my packages with

ls -l /usr/local/lib/python2.7/site-packages/ 

There it is written the correct version of python-crontab

I dont know. Probably I dont understand the relationship between pip package manager and installed python versions.

greets SchoRsch

Answer 1

'pip' means the default python version you set. You can type 'python' in the console to check the version. And the pip2 means the python2 which the previous version of python which the system have. It's the similar setting as python. For example, when you installed anaconda and set the default python path as the anaconda path. The 'python' and 'pip' version is as same as anaconda.

READ ALSO
Python Most Common values in a List

Python Most Common values in a List

I need a function that returns the most common values from a listIf there is more than one most common value, return all of them

269
Why will django form not summit data to dabase but instead displays result as a url on the broswer

Why will django form not summit data to dabase but instead displays result as a url on the broswer

When ever i summit my Django form from the templateI get the result bellow

124
An Ontology Tree is specified as a pair of parent child relation in a list/tuple

An Ontology Tree is specified as a pair of parent child relation in a list/tuple

An Ontology Tree is specified as a pair of parent child relation in a list/tupleEach element inside the list is a parent-child relation depicted as: Parent#Child

128