Re: Cherrypy older version installation error in Raspbian
"Sviatoslav Sydorenko (@webknjaz)" <[email protected]> Thu, 20 Sep 2018 15:55:02 -0700 (PDT)
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_536_1697064114.1537484102739 Content-Type: multipart/alternative; boundary="----=_Part_537_1786635332.1537484102739" ------=_Part_537_1786635332.1537484102739 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 1) you need to install it from within python3 env, from your log I see that= =20 you use python2.7, which is not supported since v18.0.0 anymore. try using= =20 `pip3` (or `python3.7 -m pip install cherrypy`) instead of just `pip`, or= =20 whatever works in your env. I recommend you to learn how to run=20 correct python and use virtualenvs. 2) don't run `setup.py` manually. always use `pip`, you might want to=20 upgrade pip and setuptools before using it. 3) don't use GitHub Releases. The officially packaged distribution resides= =20 on PyPI. =D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80, 20 =D0=B2=D0=B5=D1=80=D0=B5=D1=81=D0= =BD=D1=8F 2018 =D1=80. 21:03:52 UTC+2 =D0=BA=D0=BE=D1=80=D0=B8=D1=81=D1=82= =D1=83=D0=B2=D0=B0=D1=87 awais =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2: > > Hello, > > Hello, > > i am trying to install Lagarto Swap on my Raspbian Stretch OS but i am=20 >> facing the error as below: >> pi@raspberrypi:~/Downloads/python_tools-3.1.3/lagarto $ python lagarto.p= y >> lagarto version 2.4 (Jan 28, 2015) >> Running lagarto-swap >> Traceback (most recent call last): >> File "lagarto-swap/lagarto-swap.py", line 31, in <module> >> from swapmanager import SwapManager >> File=20 >> "/home/pi/Downloads/python_tools-3.1.3/lagarto/lagarto-swap/swapmanager.= py",=20 >> line 46, in <module> >> from lagartocomms import LagartoProcess >> File=20 >> "/home/pi/Downloads/python_tools-3.1.3/lagarto/lagarto/lagartocomms.py",= =20 >> line 28, in <module> >> from lagartohttp import LagartoHttpServer >> File=20 >> "/home/pi/Downloads/python_tools-3.1.3/lagarto/lagarto/lagartohttp.py",= =20 >> line 31, in <module> >> import cherrypy >> File=20 >> "/usr/local/lib/python2.7/dist-packages/CherryPy-18.0.1-py2.7.egg/cherry= py/__init__.py",=20 >> line 66, in <module> >> from ._cperror import ( >> File=20 >> "/usr/local/lib/python2.7/dist-packages/CherryPy-18.0.1-py2.7.egg/cherry= py/_cperror.py",=20 >> line 122, in <module> >> import urllib.parse >> ImportError: No module named parse > > > > now i am trying to install the older verison of Cherrypy and i directly= =20 > downloaded the zip file from https://github.com/cherrypy/cherrypy/release= s and=20 > then using Lx terminal using *python setup.py* but now i am facing these= =20 > errors > > pi@raspberrypi:~/Downloads/cherrypy-16.0.0 $ python setup.py >> /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown=20 >> distribution option: 'project_urls' >> warnings.warn(msg) >> Traceback (most recent call last): >> File "setup.py", line 141, in <module> >> main() >> File "setup.py", line 137, in main >> setuptools.setup(**setup_params) >> File "/usr/lib/python2.7/distutils/core.py", line 111, in setup >> _setup_distribution =3D dist =3D klass(attrs) >> File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in= =20 >> __init__ >> _Distribution.__init__(self, attrs) >> File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__ >> self.finalize_options() >> File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 387, in= =20 >> finalize_options >> ep.load()(self, ep.name, value) >> File=20 >> "/home/pi/Downloads/cherrypy-16.0.0/.eggs/setuptools_scm-3.1.0-py2.7.egg= /setuptools_scm/integration.py",=20 >> line 23, in version_keyword >> File=20 >> "/home/pi/Downloads/cherrypy-16.0.0/.eggs/setuptools_scm-3.1.0-py2.7.egg= /setuptools_scm/__init__.py",=20 >> line 142, in get_version >> File=20 >> "/home/pi/Downloads/cherrypy-16.0.0/.eggs/setuptools_scm-3.1.0-py2.7.egg= /setuptools_scm/__init__.py",=20 >> line 111, in _do_parse >> LookupError: setuptools-scm was unable to detect version for=20 >> '/home/pi/Downloads/cherrypy-16.0.0'. >> Make sure you're either building from a fully intact git repository or= =20 >> PyPI tarballs. Most other sources (such as GitHub's tarballs, a git=20 >> checkout without the .git folder) don't contain the necessary metadata a= nd=20 >> will not work. >> For example, if you're using pip, instead of=20 >> https://github.com/user/proj/archive/master.zip use git+ >> https://github.com/user/proj.git#egg=3Dproj > > > i am totally new to raspbian and Panstamp and facing these errors. > > i even uninstalled python totaly and installed the newer version but stil= l=20 > there are errors. > please tell me what is the fix :) > --=20 You received this message because you are subscribed to the Google Groups "= cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout. ------=_Part_537_1786635332.1537484102739 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">1) you need to install it from within python3 env, from yo= ur log I see that you use python2.7, which is not supported since v18.0.0 a= nymore. try using `pip3` (or `python3.7 -m pip install cherrypy`) instead o= f just `pip`, or whatever works in your env. I recommend you to learn how t= o run correct=C2=A0python and use virtualenvs.<div>2) don't run `setup.= py` manually. always use `pip`, you might want to upgrade pip and setuptool= s before using it.</div><div>3) don't use GitHub Releases. The official= ly=C2=A0packaged=C2=A0distribution resides on PyPI.<br><br>=D1=87=D0=B5=D1= =82=D0=B2=D0=B5=D1=80, 20 =D0=B2=D0=B5=D1=80=D0=B5=D1=81=D0=BD=D1=8F 2018 = =D1=80. 21:03:52 UTC+2 =D0=BA=D0=BE=D1=80=D0=B8=D1=81=D1=82=D1=83=D0=B2=D0= =B0=D1=87 awais =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2:<blockquote clas= s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c= cc solid;padding-left: 1ex;">Hello,<div><br></div><div><span style=3D"color= :rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,2= 39,239)">Hello,</span><br style=3D"color:rgb(0,0,0);font-family:Verdana,Ari= al,sans-serif;background-color:rgb(239,239,239)"><br style=3D"color:rgb(0,0= ,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)"= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex"><span style=3D"color:rgb= (0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,2= 39)">i am trying to install Lagarto Swap on my Raspbian Stretch OS but i am= facing the error as below:<br></span><span style=3D"color:rgb(0,0,0);font-= family:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">pi@raspb= errypi:~/Downloads/<wbr>python_tools-3.1.3/lagarto $ python lagarto.py<br><= /span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;= background-color:rgb(239,239,239)">lagarto version 2.4 (Jan 28, 2015)<br></= span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;b= ackground-color:rgb(239,239,239)">Running lagarto-swap<br></span><span styl= e=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color= :rgb(239,239,239)">Traceback (most recent call last):<br></span><span style= =3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:= rgb(239,239,239)">File "lagarto-swap/lagarto-swap.py"<wbr>, line = 31, in <module><br></span><span style=3D"color:rgb(0,0,0);font-family= :Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">from swapmanag= er import SwapManager<br></span><span style=3D"color:rgb(0,0,0);font-family= :Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">File "/ho= me/pi/Downloads/python_<wbr>tools-3.1.3/lagarto/lagarto-<wbr>swap/swapmanag= er.py", line 46, in <module><br></span><span style=3D"color:rgb(= 0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,23= 9)">from lagartocomms import LagartoProcess<br></span><span style=3D"color:= rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,23= 9,239)">File "/home/pi/Downloads/python_<wbr>tools-3.1.3/lagarto/lagar= to/<wbr>lagartocomms.py", line 28, in <module><br></span><span s= tyle=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-co= lor:rgb(239,239,239)">from lagartohttp import LagartoHttpServer<br></span><= span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;backgro= und-color:rgb(239,239,239)">File "/home/pi/Downloads/python_<wbr>tools= -3.1.3/lagarto/lagarto/<wbr>lagartohttp.py", line 31, in <module>= ;<br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-= serif;background-color:rgb(239,239,239)">import cherrypy<br></span><span st= yle=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-col= or:rgb(239,239,239)">File "/usr/local/lib/python2.7/<wbr>dist-packages= /CherryPy-18.0.1-<wbr>py2.7.egg/cherrypy/__init__.<wbr>py", line 66, i= n <module><br></span><span style=3D"color:rgb(0,0,0);font-family:Verd= ana,Arial,sans-serif;background-color:rgb(239,239,239)">from ._cperror impo= rt (<br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sa= ns-serif;background-color:rgb(239,239,239)">File "/usr/local/lib/pytho= n2.7/<wbr>dist-packages/CherryPy-18.0.1-<wbr>py2.7.egg/cherrypy/_cperror.<w= br>py", line 122, in <module><br></span><span style=3D"color:rgb= (0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,2= 39)">import urllib.parse<br></span><span style=3D"color:rgb(0,0,0);font-fam= ily:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">ImportError= : No module named parse</span></blockquote><div><br></div><div><br></div><d= iv>now i am trying to install the older verison of Cherrypy and i directly = downloaded the zip file from=C2=A0<a href=3D"https://github.com/cherrypy/ch= errypy/releases" style=3D"color:rgb(2,108,177);font-family:Verdana,Arial,sa= ns-serif;background-color:rgb(239,239,239)" target=3D"_blank" rel=3D"nofoll= ow" onmousedown=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3= A%2F%2Fgithub.com%2Fcherrypy%2Fcherrypy%2Freleases\x26sa\x3dD\x26sntz\x3d1\= x26usg\x3dAFQjCNENGL_N_F_sC2Tf1oE1sWABd5qg6A';return true;" onclick=3D"= this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2= Fcherrypy%2Fcherrypy%2Freleases\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENG= L_N_F_sC2Tf1oE1sWABd5qg6A';return true;">https://github.com/<wbr>cherry= py/cherrypy/releases</a>=C2=A0and then using Lx terminal using <u>python se= tup.py</u>=C2=A0but now i am facing these errors</div></div><div><br></div>= <div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo= rder-left:1px solid rgb(204,204,204);padding-left:1ex"><span style=3D"color= :rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,2= 39,239)">pi@raspberrypi:~/Downloads/<wbr>cherrypy-16.0.0 $ python setup.py<= br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-se= rif;background-color:rgb(239,239,239)">/usr/lib/python2.7/distutils/<wbr>di= st.py:267: UserWarning: Unknown distribution option: 'project_urls'= <br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-s= erif;background-color:rgb(239,239,239)">warnings.warn(msg)<br></span><span = style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-c= olor:rgb(239,239,239)">Traceback (most recent call last):<br></span><span s= tyle=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-co= lor:rgb(239,239,239)">File "setup.py", line 141, in <module>= ;<br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-= serif;background-color:rgb(239,239,239)">main()<br></span><span style=3D"co= lor:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(23= 9,239,239)">File "setup.py", line 137, in main<br></span><span st= yle=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-col= or:rgb(239,239,239)">setuptools.setup(**setup_<wbr>params)<br></span><span = style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-c= olor:rgb(239,239,239)">File "/usr/lib/python2.7/distutils/<wbr>core.py= ", line 111, in setup<br></span><span style=3D"color:rgb(0,0,0);font-f= amily:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">_setup_di= stribution =3D dist =3D klass(attrs)<br></span><span style=3D"color:rgb(0,0= ,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)"= >File "/usr/lib/python2.7/dist-<wbr>packages/setuptools/dist.py",= line 320, in __init__<br></span><span style=3D"color:rgb(0,0,0);font-famil= y:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">_Distribution= .__init__(self, attrs)<br></span><span style=3D"color:rgb(0,0,0);font-famil= y:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">File "/u= sr/lib/python2.7/distutils/<wbr>dist.py", line 287, in __init__<br></s= pan><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;ba= ckground-color:rgb(239,239,239)">self.finalize_options()<br></span><span st= yle=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-col= or:rgb(239,239,239)">File "/usr/lib/python2.7/dist-<wbr>packages/setup= tools/dist.py", line 387, in finalize_options<br></span><span style=3D= "color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb= (239,239,239)">ep.load()(self, <a href=3D"http://ep.name" target=3D"_blank"= rel=3D"nofollow" onmousedown=3D"this.href=3D'http://www.google.com/url= ?q\x3dhttp%3A%2F%2Fep.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCMHKrTB= wvuzf2kSJMnvW5zTZuFA';return true;" onclick=3D"this.href=3D'http://= www.google.com/url?q\x3dhttp%3A%2F%2Fep.name\x26sa\x3dD\x26sntz\x3d1\x26usg= \x3dAFQjCNGCMHKrTBwvuzf2kSJMnvW5zTZuFA';return true;">ep.name</a>, valu= e)<br></span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans= -serif;background-color:rgb(239,239,239)">File "/home/pi/Downloads/che= rrypy-<wbr>16.0.0/.eggs/setuptools_scm-3.<wbr>1.0-py2.7.egg/setuptools_scm/= <wbr>integration.py", line 23, in version_keyword<br></span><span styl= e=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color= :rgb(239,239,239)">File "/home/pi/Downloads/cherrypy-<wbr>16.0.0/.eggs= /setuptools_scm-3.<wbr>1.0-py2.7.egg/setuptools_scm/_<wbr>_init__.py",= line 142, in get_version<br></span><span style=3D"color:rgb(0,0,0);font-fa= mily:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">File "= ;/home/pi/Downloads/cherrypy-<wbr>16.0.0/.eggs/setuptools_scm-3.<wbr>1.0-py= 2.7.egg/setuptools_scm/_<wbr>_init__.py", line 111, in _do_parse<br></= span><span style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;b= ackground-color:rgb(239,239,239)">LookupError: setuptools-scm was unable to= detect version for '/home/pi/Downloads/cherrypy-<wbr>16.0.0'.</spa= n><br style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;backgr= ound-color:rgb(239,239,239)"><span style=3D"color:rgb(0,0,0);font-family:Ve= rdana,Arial,sans-serif;background-color:rgb(239,239,239)">Make sure you'= ;re either building from a fully intact git repository or PyPI tarballs. Mo= st other sources (such as GitHub's tarballs, a git checkout without the= .git folder) don't contain the necessary metadata and will not work.</= span><br style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;bac= kground-color:rgb(239,239,239)"><span style=3D"color:rgb(0,0,0);font-family= :Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">For example, i= f you're using pip, instead of=C2=A0</span><a href=3D"https://github.co= m/user/proj/archive/master.zip" style=3D"color:rgb(2,108,177);font-family:V= erdana,Arial,sans-serif;background-color:rgb(239,239,239)" target=3D"_blank= " rel=3D"nofollow" onmousedown=3D"this.href=3D'https://www.google.com/u= rl?q\x3dhttps%3A%2F%2Fgithub.com%2Fuser%2Fproj%2Farchive%2Fmaster.zip\x26sa= \x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNENRMj_88nk99x4eWkpZ4XUGUDQLA';return= true;" onclick=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3= A%2F%2Fgithub.com%2Fuser%2Fproj%2Farchive%2Fmaster.zip\x26sa\x3dD\x26sntz\x= 3d1\x26usg\x3dAFQjCNENRMj_88nk99x4eWkpZ4XUGUDQLA';return true;">https:/= /github.com/user/<wbr>proj/archive/master.zip</a><span style=3D"color:rgb(0= ,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb(239,239,239= )">=C2=A0use git+<a href=3D"https://github.com/user/proj.git#egg=3Dproj" ta= rget=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https://ww= w.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fuser%2Fproj.git%23egg%3Dpr= oj\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEev5o5bN63sxkp0WSkxjoa-zVfwQ'= ;;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q\x3= dhttps%3A%2F%2Fgithub.com%2Fuser%2Fproj.git%23egg%3Dproj\x26sa\x3dD\x26sntz= \x3d1\x26usg\x3dAFQjCNEev5o5bN63sxkp0WSkxjoa-zVfwQ';return true;">https= ://github.com/user/<wbr>proj.git#egg=3Dproj</a></span></blockquote><br styl= e=3D"color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color= :rgb(239,239,239)"><span style=3D"color:rgb(0,0,0);font-family:Verdana,Aria= l,sans-serif;background-color:rgb(239,239,239)">i am totally new to raspbia= n and Panstamp and facing these errors.</span><br></div><div><span style=3D= "color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;background-color:rgb= (239,239,239)"><br></span></div><div><span style=3D"color:rgb(0,0,0);font-f= amily:Verdana,Arial,sans-serif;background-color:rgb(239,239,239)">i even un= installed python totaly and installed the newer version but still there are= errors.</span></div><div><span style=3D"color:rgb(0,0,0);font-family:Verda= na,Arial,sans-serif;background-color:rgb(239,239,239)">please tell me what = is the fix :)</span></div></blockquote></div></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;cherrypy-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]">cher= rypy-users+unsubscribe-/[email protected]</a>.<br /> To post to this group, send email to <a href=3D"mailto:cherrypy-users@googl= egroups.com">cherrypy-users-/[email protected]</a>.<br /> Visit this group at <a href=3D"https://groups.google.com/group/cherrypy-use= rs">https://groups.google.com/group/cherrypy-users</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> ------=_Part_537_1786635332.1537484102739-- ------=_Part_536_1697064114.1537484102739--