HelioHost Posted August 25, 2017 Posted August 25, 2017 Hi HelioHost! I'm on Johnny server and need access to Python modules: requests and pygsheetsRequests: http://docs.python-requests.org/en/master/user/install/Pygsheets: https://github.com/nithinmurali/pygsheets Could you help me install these modules onto the server? Also, is there a place where I can check which modules are installed on the servers by default? Or can I assume whatever modules come with a regular Python install will be what's installed on the servers? Thank you very much!
Krydos Posted August 25, 2017 Posted August 25, 2017 Which version of python are you using on Johnny? Here are the installed modules on Johnny Python 2.6.6 https://krydos2.heliohost.org/cgi-bin/modules26.py Here are the installed modules on Johnny Python 3.6.1 https://krydos2.heliohost.org/cgi-bin/modules36.py
HelioHost Posted August 25, 2017 Author Posted August 25, 2017 I am using Python 2 instead of Python 3. It seems like there are not that m=any modules on the server. I am kind of new to this but in my script, I am =importing cgitb, requests, pygsheets, and time. Could you help me install t=hese if they're not already on the server? Thank you!=0A==0A=________________________________________=0A=
Krydos Posted August 25, 2017 Posted August 25, 2017 Python 2.6.6 on Johnny is too old to install modules globally. I believe you can still include the module using something like https://stackoverflow.com/questions/279237/import-a-module-from-a-relative-path Let us know if you need more help. We could also install the latest Python 2.7 version on Johnny if that works better for you. Python 2.7.x would be able to have new modules installed where 2.6.6 cannot.
HelioHost Posted August 25, 2017 Author Posted August 25, 2017 Oh that would be great if you could install the latest Python 2.7 version. =Just confirming, you would be able to install the new modules too if Johnny= is updated to 2.7.x? Either way, updating to the latest 2.7 version would =be greatly appreciated. Thank you!=0A=________________________________________=0A=
Krydos Posted August 26, 2017 Posted August 26, 2017 Python version 2.7.13 is now available on Johnny at /usr/bin/python2.7 I have installed requests and pygsheets. You can see the installed modules at https://krydos2.heliohost.org/cgi-bin/modules27.py
HelioHost Posted August 26, 2017 Author Posted August 26, 2017 Hey, thanks for updating the python version. However, I do not see pygsheet=s as an installed modules. My script also does not run because when importi=ng pygsheets, it says no module named pygsheets. Could you check on that ag=ain for me? Thank you very much!=0A=________________________________________=0A=
HelioHost Posted August 26, 2017 Author Posted August 26, 2017 Actually, never mind. I just didn't specify python2.7 in my script. It's al=l working now. Thank you so much for quick and top notch support!=0A=________________________________________=0A=
Krydos Posted August 26, 2017 Posted August 26, 2017 I noticed that too. Even though pygsheets doesn't show up in that modules list it still works when you import it. Not sure why the modules27.py script doesn't list it.
HelioHost Posted August 26, 2017 Author Posted August 26, 2017 Hey! Sorry for not including this earlier but could you help me install the= pytz module: https://pypi.python.org/pypi/pytz? Need this to work with dif=ferent timezones as the server timezone is not the same as the one I am in.= Thank you very much!=0A=________________________________________=0A=
Krydos Posted August 27, 2017 Posted August 27, 2017 The module pytz has been installed on the Johnny python version 2.7.13.
Recommended Posts