apollo_moon_driver Posted July 8, 2014 Share Posted July 8, 2014 try to install orm peewee on opensuse 13. 1but unfortunatly it failed martin@linux-70ce:~> martin@linux-70ce:~> git clone https://github.com/coleifer/peewee.git Klone nach 'peewee'... remote: Reusing existing pack: 5673, done. remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 5686 (delta 2), reused 0 (delta 0) Empfange Objekte: 100% (5686/5686), 3.54 MiB | 102.00 KiB/s, done. Löse Unterschiede auf: 100% (3468/3468), done. Prüfe Konnektivität... Fertig martin@linux-70ce:~> cd peewee martin@linux-70ce:~/peewee> python setup.py install running install error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-5717.write-test' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/lib/python2.7/site-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. martin@linux-70ce:~/peewee> what can i do now Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/ Share on other sites More sharing options...
apollo_moon_driver Posted July 8, 2014 Author Share Posted July 8, 2014 this was the way i tried to install it:http://peewee.readthedocs.org/en/latest/peewee/installation.htmlhttp://peewee.readthedocs.org/en/latest/peewee/database.html Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/#findComment-1484308 Share on other sites More sharing options...
apollo_moon_driver Posted July 8, 2014 Author Share Posted July 8, 2014 this was the way i tried to install it:Installing peewee — peewee 2.2.5 documentationDatabases — peewee 2.2.5 documentationbut unfortunatly it failed martin@linux-70ce:~> martin@linux-70ce:~> git clone https://github.com/coleifer/peewee.git Klone nach 'peewee'... remote: Reusing existing pack: 5673, done. remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 5686 (delta 2), reused 0 (delta 0) Empfange Objekte: 100% (5686/5686), 3.54 MiB | 102.00 KiB/s, done. Löse Unterschiede auf: 100% (3468/3468), done. Prüfe Konnektivität... Fertig martin@linux-70ce:~> cd peewee martin@linux-70ce:~/peewee> python setup.py install running install error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-5717.write-test' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/lib/python2.7/site-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. martin@linux-70ce:~/peewee> what can i do nowsee here after installation vof simplejson - it went better - see the followingPlease make the appropriate changes for your system and try again. martin@linux-70ce:~/peewee> git clone https://github.com/coleifer/peewee.git Klone nach 'peewee'... remote: Reusing existing pack: 5673, done. remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 5686 (delta 2), reused 0 (delta 0) Empfange Objekte: 100% (5686/5686), 3.54 MiB | 309.00 KiB/s, done. Löse Unterschiede auf: 100% (3468/3468), done. Prüfe Konnektivität... Fertig martin@linux-70ce:~/peewee> guess that now all is fine - i will do some checksand afterwards i will come back here.had issues with installing peeweemartin@linux-70ce:~> martin@linux-70ce:~> git clone https://github.com/coleifer/peewee.git Klone nach 'peewee'... remote: Reusing existing pack: 5673, done. remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 5686 (delta 2), reused 0 (delta 0) Empfange Objekte: 100% (5686/5686), 3.54 MiB | 102.00 KiB/s, done. Löse Unterschiede auf: 100% (3468/3468), done. Prüfe Konnektivität... Fertig martin@linux-70ce:~> cd peewee martin@linux-70ce:~/peewee> python setup.py install running install error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-5717.write-test' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/lib/python2.7/site-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: https://pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. martin@linux-70ce:~/peewee> afer that - as written above - i installed simplejson and then i tried to install peewee againnow i guess i had more luck.... martin@linux-70ce:~/peewee> git clone https://github.com/coleifer/peewee.git Klone nach 'peewee'... remote: Reusing existing pack: 5673, done. remote: Counting objects: 13, done. remote: Compressing objects: 100% (13/13), done. remote: Total 5686 (delta 2), reused 0 (delta 0) Empfange Objekte: 100% (5686/5686), 3.54 MiB | 309.00 KiB/s, done. Löse Unterschiede auf: 100% (3468/3468), done. Prüfe Konnektivität... Fertig martin@linux-70ce:~/peewee> SEE THE FULL CODE - THAT I AM RUNNINGimport urllib import urlparse import re from peewee import * import json db = MySQLDatabase('cpan', user='root',passwd='rimbaud') class User(Model): name = TextField() cname = TextField() email = TextField() url = TextField() class Meta: database = db # this model uses the cpan database User.create_table() #ensure table is created url = "http://search.cpan.org/author/?W" html = urllib.urlopen(url).read() for lk, capname, name in re.findall('<a href="(/~.*?/)"><b>(.*?)</b></a><br/><small>(.*?)</small>', html): alk = urlparse.urljoin(url, lk) data = { 'url':alk, 'name':name, 'cname':capname } phtml = urllib.urlopen(alk).read() memail = re.search('<a href="mailto:(.*?)">', phtml) if memail: data['email'] = memail.group(1) data = json.load() #your json data file here for entry in data: #assuming your data is an array of JSON objects user = User.create(name=entry["name"], cname=entry["cname"], email=entry["email"], url=entry["url"]) user.save() and the subsequently results: martin@linux-70ce:~/perl> python cpan6.py python: can't open file 'cpan6.py': [Errno 2] No such file or directory martin@linux-70ce:~/perl> python cpan5.py Traceback (most recent call last): File "cpan5.py", line 7, in <module> from peewee import * ImportError: No module named peewee martin@linux-70ce:~/perl> Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/#findComment-1484316 Share on other sites More sharing options...
jazzman1 Posted July 9, 2014 Share Posted July 9, 2014 Sounds like, this account doesn't have permissions to install the app. Have you tried as root? Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/#findComment-1484408 Share on other sites More sharing options...
apollo_moon_driver Posted July 9, 2014 Author Share Posted July 9, 2014 After the installation of peewwee i runned a script again,,, Code: import urllib import urlparse import re import peewee import json db = MySQLDatabase('cpan', user='root',passwd='rimbaud') class User(Model): name = TextField() cname = TextField() email = TextField() url = TextField() class Meta: database = db # this model uses the cpan database User.create_table() #ensure table is created url = "http://search.cpan.org/author/?W" html = urllib.urlopen(url).read() for lk, capname, name in re.findall('<a href="(/~.*?/)"><b>(.*?)</b></a><br/><small>(.*?)</small>', html): alk = urlparse.urljoin(url, lk) data = { 'url':alk, 'name':name, 'cname':capname } phtml = urllib.urlopen(alk).read() memail = re.search('<a href="mailto:(.*?)">', phtml) if memail: data['email'] = memail.group(1) data = json.load() #your json data file here for entry in data: #assuming your data is an array of JSON objects user = User.create(name=entry["name"], cname=entry["cname"], email=entry["email"], url=entry["url"]) user.save() i got back the following results: Code: Traceback (most recent call last): File "cpan5.py", line 10, in <module> db = MySQLDatabase('cpan', user='root',passwd='rimbaud') NameError: name 'MySQLDatabase' is not defined linux-70ce:/home/martin/perl # well i guess that i have some issues with the name.note:the database is named cpanthe user is rootthe passwd is rimbaud Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/#findComment-1484413 Share on other sites More sharing options...
jazzman1 Posted July 9, 2014 Share Posted July 9, 2014 I don't know how to access MySQL using Python. I am not using that language. Are you able to access mysql and its databases without using this app? Quote Link to comment https://forums.phpfreaks.com/topic/289638-tried-to-install-peewee-on-opensuse-13-1-failes-permanently/#findComment-1484427 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.