kencodes
Posts: 2
Joined: Thu May 16, 2013 4:57 pm
Location: San Jose, CA

Need help installing Peewee ORM for Python

Thu May 16, 2013 5:07 pm

I have a project in which I am trying to connect my python program to a MySQL database in order to authenticate users and keep a log of what they do. I read this article on StackOverflow http://stackoverflow.com/q/372885 that got me interested in using the Peewee ORM to simplify the linking of Python to MySQL.

However, I'm not finding much help on installing Peewee on my Pi and the recommended instructions http://peewee.readthedocs.org/en/latest ... g-manually didn't work. I received this message:

Code: Select all

[email protected] ~/peewee $ sudo python setup.py install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools
Any ideas for how to fix this? Should I even be using Peewee, or should I just code all the lower level SQL commands in my Python program? Thanks for your help.

-Ken

timhoffman
Posts: 85
Joined: Sat Nov 05, 2011 11:31 pm

Re: Need help installing Peewee ORM for Python

Fri May 17, 2013 1:42 am

You need to install setuptools

Code: Select all

sudo apt-get install python-setuptools

beetlejuice
Posts: 4
Joined: Thu Nov 01, 2012 11:51 pm

Re: Need help installing Peewee ORM for Python

Wed Jun 05, 2013 4:46 pm

Author of peewee here -- Let me know if you run into any trouble! You also will want to install the python mysql driver:

Code: Select all

# pure python driver, supports python 2.x and 3.x
pip install pymysql

Code: Select all

# c driver, supports python 2.x
sudo apt-get install python-dev libmysqlclient-dev
pip install MySQL-python

matrixsquare
Posts: 1
Joined: Wed Nov 18, 2015 6:48 am

Re: Need help installing Peewee ORM for Python

Wed Nov 18, 2015 6:53 am

Hi i need help in installing peewee. Following is the error message I am receiving when I install peewee in my raspberry pie
[email protected] ~/wemocontrol/peewee $ sudo python setup.py install
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
Traceback (most recent call last):
File "setup.py", line 42, in <module>
scripts = ['pwiz.py'],
File "/usr/lib/python2.7/distutils/core.py", line 137, in setup
ok = dist.parse_command_line()
File "/usr/lib/python2.7/distutils/dist.py", line 467, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/usr/lib/python2.7/distutils/dist.py", line 523, in _pars]e_command_opts
cmd_class = self.get_command_class(command)
File "/usr/lib/python2.7/distutils/dist.py", line 806, in get_command_class
klass = self.cmdclass.get(command)
AttributeError: 'NoneType' object has no attribute 'get'

Return to “Python”