|
From: | Vincenzo Mone |
Subject: | R: R: Cannot run a command |
Date: | Sun, 6 Sep 2020 18:50:06 +0200 |
Hi Chris, first thanks for coming back to my help request. I state that I'm not good in Linux Honestly I have already tried to use that site but did not get any success, Maybe because I did not understood what to do. I try to follow again the site and let you know what I do and the results: I have opened Terminal and gave the following command: import urllib2.request Nothing happened but I see the mouse pointer change in a cross Then I gave the second command: response = urllib2.urlopen("http://www.google.com") also here nothing happened so I carry on with the third command: html = response.read() also here nothing happened so I carry on with the fourth command: print(html) also here nothing happened. Now what to do? Actually I am stuck like this Thanks 73’s de Enzo IK8OZV EasyLog 5 BetaTester EasyLog PDA BetaTester WinBollet BetaTester D.C.I. CheckPoint Regione Campania Skype: ik8ozv8520 ********************************* ****** GSM +39 328 7110193 ****** ***** SMS +39 328 7110193 ***** ********************************* > -----Messaggio originale----- > Da: Chris Gorman <chrisjohgorman@gmail.com> > Inviato: domenica 6 settembre 2020 18:25 > A: Vincenzo Mone <vimone@alice.it> > Oggetto: Re: R: Cannot run a command > > On Sun, Sep 6, 2020 at 11:50 AM Vincenzo Mone <vimone@alice.it> wrote: > > > > Please anybody out there available to help me to solve my problem? > > If yes please should we continue on this thread or start from the beginner > using this thread. > > Or start a new thread? > > Thanks > > > Hi Vincenzo, > > I'm not an expert, but I will try to help you get your program loaded and > running. You should be using python3 not python2. Python2 ended it's > development cycle on Jan 1, 2020. It is no longer maintained. > If I understand your error from python3, you are unable to import urllib2. > This is because urllib2 has been renamed urllib in Python3. > (See https://stackoverflow.com/questions/2792650/import-error-no- > .) I would try running '2to3' on your script or manually editing the script, > renaming the 'import urllib2' to 'import urllib'. Best of luck and let me know > how it goes once you make the changes. > > Chris > > > >>> > > > >>> File > > > >>> "/home/enzo/gr-lilacsat-pyqt5/examples/BY70-2/DSLWP-Downlink- > > > >> Proxy/mun > > > >>> _downlink_proxy.py", > > > >>> line 29, in <module> > > > >>> > > > >>> import urllib2 > > > >>> > > > >>> ModuleNotFoundError: No module named 'urllib2' > > > >>> |
[Prev in Thread] | Current Thread | [Next in Thread] |