Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


python_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
python_notes [2020/11/18 08:58] juckinspython_notes [2022/01/20 10:44] juckins
Line 1: Line 1:
 ==== Python Install Notes ==== ==== Python Install Notes ====
  
-__11 Oct 2020__+__20 Jan 2022__ 
 + 
 +Upgraded several python packages. 
 + 
 +  [root@tidewater: ~]# python3 -m pip list --outdated 
 +  Package             Version        Latest         Type 
 +  ------------------- -------------- -------------- ----- 
 +  charset-normalizer  2.0.7          2.0.10         wheel 
 +  chromedriver-binary 96.0.4664.35.0 98.0.4758.48.0 sdist 
 +  requests            2.26.0         2.27.1         wheel 
 +  setuptools          59.1.1         59.6.0         wheel 
 +  urllib3             1.26.7         1.26.8         wheel 
 + 
 +  [root@tidewater: ~]# python3 -m pip install --upgrade <package_name> 
 + 
 +Note: Did not update chromedriver-binary as Chrome is still version 97.0.4692.99 
 + 
 +__16 Nov 2021__ 
 +   
 +Upgraded several python packages. 
 +   
 +  [root@tidewater: ~]# python3 -m pip list --outdated 
 +  Package             Version        Latest         Type 
 +  ------------------- -------------- -------------- ----- 
 +  certifi             2021.5.30      2021.10.8      wheel 
 +  charset-normalizer  2.0.6          2.0.7          wheel 
 +  chromedriver-binary 94.0.4606.61.0 96.0.4664.35.0 sdist 
 +  idna                3.2            3.3            wheel 
 +  Pillow              8.3.2          8.4.0          wheel 
 +  pytz                2021.1         2021.3         wheel 
 +  setuptools          58.1.0         59.1.1         wheel 
 +   
 +  [root@tidewater: ~]# python3 -m pip install --upgrade <package_name> 
 + 
 +__29 Sep 2021__ 
 + 
 +Upgraded the following python3 packages using the commands listed below: 
 + 
 +  pip 
 +  charset-normalizer 
 +  setuptools 
 +  urllib3 
 +  chromedriver-binary 
 +   
 +Then got the following error message for chromedriver-binary: 
 + 
 +  selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 95 
 +  Current browser version is 94.0.4606.61 with binary path /usr/bin/google-chrome 
 + 
 +So did the following to fix: 
 + 
 +  python3 -m pip install chromedriver-binary==94.0.4606.61 
 +  find /usr -name "chromedriver" -exec ls -l {} \; 
 +  chmod 755 /usr/local/lib/python3.6/site-packages/chromedriver_binary/chromedriver 
 + 
 +__21 Jul 2021__ 
 + 
 +  # python3 -m pip list --outdated 
 +  Package             Version        Latest         Type 
 +  ------------------- -------------- -------------- ----- 
 +  certifi             2020.12.5      2021.5.30      wheel 
 +  chromedriver-binary 91.0.4472.19.0 92.0.4515.43.0 sdist 
 +  idna                3.1            3.2            wheel 
 +  requests            2.25.1         2.26.0         wheel 
 +  setuptools          57.0.0         57.4.0         wheel 
 +  urllib3             1.26.5         1.26.6         wheel 
 + 
 +Upgraded all using: 
 + 
 +  python3 -m pip install --upgrade <package_name> 
 +   
 +Note on chromedriver-binary...don't forget to check/adjust permissions: 
 + 
 +  # find /usr -name "chromedriver" -exec ls -l {} \; 
 +  # chmod 755 /usr/local/lib/python3.6/site-packages/chromedriver_binary/chromedriver 
 + 
 +__26 May 2021__ 
 + 
 + 
 +These packages were outdated: 
 + 
 +  # python3 -m pip list --outdated 
 +  Package             Version        Latest         Type 
 +  ------------------- -------------- -------------- ----- 
 +  chromedriver-binary 90.0.4430.24.0 91.0.4472.19.0 sdist 
 +  pip                 21.1.1         21.1.2         wheel 
 +  setuptools          56.0.0         57.0.0         wheel 
 +  WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available. 
 +  You should consider upgrading via the '/bin/python3 -m pip install --upgrade pip' command. 
 + 
 +Upgraded all using: 
 + 
 +  python3 -m pip install --upgrade <package_name> 
 +   
 + 
 +__15 Apr 2021__ 
 + 
 +Updated various python packages, including chromedriver-binary 
 + 
 +__3 Mar 2021__ 
 + 
 + 
 +These packages were outdated: 
 +   
 +  # python3 -m pip list --outdated 
 +  Package             Version        Latest         Type 
 +  ------------------- -------------- -------------- ----- 
 +  certifi             2020.11.8      2020.12.5      wheel 
 +  chardet             3.0.4          4.0.0          wheel 
 +  chromedriver-binary 87.0.4280.20.0 89.0.4389.23.0 sdist 
 +  httplib2            0.18.1         0.19.0         wheel 
 +  idna                2.10           3.1            wheel 
 +  PyMySQL             0.10.1         1.0.2          wheel 
 +  pytz                2020.4         2021.1         wheel 
 +  requests            2.25.0         2.25.1         wheel 
 +  selenium-wire       2.1.2          4.2.0          wheel 
 +  setuptools          50.3.2         54.0.0         wheel 
 +  urllib3             1.26.2         1.26.3         wheel 
 +  wheel               0.35.1         0.36.2         wheel 
 + 
 +Upgraded all using: 
 + 
 +  python3 -m pip install --upgrade <package_name> 
 +   
 +<color #ed1c24>except for PyMySQL.  'tidewater' needs updates to mariadb v10.</color>  Need to check python scripts first for ASMAD (and test on VM first). 
 + 
 +__18 Nov 2020__
  
 Manually updated chrome to v87. Manually updated chrome to v87.
Line 8: Line 134:
   python3 -m pip list --outdated   python3 -m pip list --outdated
      
-Then ran the following for each <package_name>+With the resulting list, then ran the following for each <package_name>
   python3 -m pip install --upgrade <package_name>   python3 -m pip install --upgrade <package_name>
  
Line 42: Line 168:
   # /usr/bin/python3 -m pip uninstall chromedriver-binary   # /usr/bin/python3 -m pip uninstall chromedriver-binary
   # /usr/bin/python3 -m pip install chromedriver-binary   # /usr/bin/python3 -m pip install chromedriver-binary
 +  
 +Note: you can also do specific versions of chromedrive-binary:
 +
 +  # python3 -m pip install chromedriver-binary==90.0.4430.24.0
 +
   # /usr/bin/python3 -m pip install --upgrade pip   # /usr/bin/python3 -m pip install --upgrade pip
   # find /usr -name "chromedriver" -exec ls -l {} \;   # find /usr -name "chromedriver" -exec ls -l {} \;
Line 149: Line 280:
   pip3.6 install --upgrade httplib2   pip3.6 install --upgrade httplib2
   pip3.6 install pymysql   pip3.6 install pymysql
 +  pip3.6 install selenium
   pip3.6 install selenium-wire   pip3.6 install selenium-wire
   pip3.6 install chromedriver   pip3.6 install chromedriver
Line 155: Line 287:
   pip3.6 install wget   pip3.6 install wget
   pip3.6 install pip-upgrade-outdated   pip3.6 install pip-upgrade-outdated
 +  pip3.6 install pytz
 +  pip3.6 install astral
 +
 +Note: replace the "pip3.6 install" with "/usr/bin/python3 -m pip install"
      
 To update all pip packages: To update all pip packages:
python_notes.txt · Last modified: 2023/04/05 08:56 by juckins