python_notes
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
python_notes [2017/08/29 08:36] – created juckins | python_notes [2020/10/09 09:23] – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Python Notes ==== | + | ==== Python |
- | Use "pip" to manage python packages. | + | __6 Oct 2020__ |
+ | # python3 -m pip install demjson | ||
+ | # python3 -m pip install wheel | ||
- | | + | __26 Aug 2020__ |
+ | |||
+ | Updated Chrome via yum to version 85.0.4183.83-1 and now check_envoy.pl fails. | ||
+ | |||
+ | Did the following as root to fix: | ||
+ | |||
+ | | ||
+ | # / | ||
+ | # / | ||
+ | # find /usr -name " | ||
+ | # chmod 755 / | ||
+ | |||
+ | Re-ran the cron and script worked. | ||
+ | |||
+ | __20 May 2020__ | ||
+ | |||
+ | Updated Chrome via yum to version 83.0.4103.61-1 and now check_envoy.pl fails. | ||
+ | |||
+ | Did the following as root to fix: | ||
+ | |||
+ | # / | ||
+ | # / | ||
+ | # / | ||
+ | # find /usr -name " | ||
+ | # chmod 755 / | ||
+ | |||
+ | Re-ran the cron and script worked. | ||
+ | |||
+ | Then tried looking at old packages needing an update: | ||
+ | |||
+ | # cd / | ||
+ | # ./pip3 list --outdated | ||
+ | # pip_upgrade_outdated | ||
+ | |||
+ | __8 April 2020__ | ||
+ | |||
+ | Upgraded Chrome via yum to version 81.0.4044.92 and now check_envoy.pl fails. | ||
+ | |||
+ | Did the following as root to fix: | ||
+ | |||
+ | # / | ||
+ | # / | ||
+ | # / | ||
| | ||
- | # pip list | + | # cd / |
+ | # ./pip3 install --upgrade | ||
+ | # ./ | ||
+ | # pip_upgrade_outdated | ||
| | ||
+ | # find /usr -name " | ||
+ | | ||
+ | / | ||
+ | | ||
+ | # chmod 755 / | ||
+ | The pip upgrade moved the astral package to v2.1 which broke sun.py and it needed some major changes. | ||
+ | | ||
+ | __11 December 2019__ | ||
+ | |||
+ | Upgraded Chrome via yum to version 79.0.3945.79 and now check_envoy.pl fails. | ||
+ | |||
+ | Did the following as root to fix: | ||
+ | |||
+ | # / | ||
+ | # / | ||
+ | # / | ||
+ | # pip-upgrade-outdated | ||
+ | | ||
+ | # find /usr -name " | ||
+ | | ||
+ | / | ||
+ | / | ||
+ | |||
+ | # chmod 755 / | ||
+ | |||
+ | Note that both **/ | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | With CentOS7.7, python3 can load from base. Do the following to fix previously-installed IUS release: | ||
+ | |||
+ | # yum remove python36u | ||
+ | # yum install python3 | ||
+ | # yum remove ius-release | ||
+ | |||
+ | * Then follow instructions for installing local python packages to ensure all still work. | ||
+ | * If you have pip problems, uninstall/ | ||
+ | * Ensure pip3.6 is in your $PATH or you have a sym link to it (/ | ||
+ | |||
+ | __Install Python 3.6 on CentOS 7__: | ||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | Do some local configuration for my scripts (su - root): | ||
+ | pip3.6 install --upgrade pip | ||
+ | pip3.6 install --upgrade httplib2 | ||
+ | pip3.6 install pymysql | ||
+ | pip3.6 install selenium-wire | ||
+ | pip3.6 install chromedriver | ||
+ | pip3.6 install chromedriver_binary | ||
+ | pip3.6 install dictor | ||
+ | pip3.6 install wget | ||
+ | pip3.6 install pip-upgrade-outdated | ||
+ | | ||
+ | To update all pip packages: | ||
+ | |||
+ | # pip_upgrade_outdated | ||
+ | |||
+ | Note that https:// | ||
+ | | ||
+ | Download and install geckodriver (see https:// | ||
+ | |||
+ | As root, copy geckodriver to / | ||
+ | |||
+ | Notes at https:// | ||
+ | | ||
+ | Notes about [[https:// | ||
+ | |||
+ | Python3.7 on Fedora 28: | ||
+ | * dnf install python37 | ||
+ | * wget https:// | ||
+ | * python3.7 get-pip.py | ||
+ | * python3.7 -m pip install requests | ||
+ | |||
+ | Use " | ||
+ | |||
+ | # yum install python2-pip | ||
+ | |||
+ | To list installed python modules: | ||
+ | | ||
+ | $ pip list |
python_notes.txt · Last modified: 2023/04/05 08:56 by juckins