python_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
python_notes [2018/09/03 09:45] – juckins | python_notes [2019/12/11 13:34] – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Python Notes ==== | ==== Python Notes ==== | ||
+ | | ||
+ | __11 December 2019__ | ||
- | Use " | + | Upgraded Chrome via yum and selenium, chromedriver-binary fails. |
- | # yum install python2-pip | + | Did the following as root: |
- | To list installed python modules: | + | / |
+ | / | ||
+ | / | ||
+ | pip-upgrade-outdated | ||
| | ||
- | | + | |
- | + | / | |
- | Python 3 installation tips: | + | / |
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | 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/ | ||
+ | | ||
+ | |||
+ | __Install | ||
+ | * https:// | ||
* https:// | * https:// | ||
- | * http://ask.xmodulo.com/install-python3-centos.html | + | |
- | | + | 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://pypi.org/project/pip-upgrade-outdated/ is a good resource to update all PIP packages. | ||
+ | | ||
+ | Download and install geckodriver (see https://github.com/mozilla/geckodriver/ | ||
+ | |||
+ | As root, copy geckodriver to / | ||
+ | |||
+ | Notes at https:// | ||
+ | | ||
+ | Notes about [[https://www.tutorialspoint.com/python3/python_database_access.htm|Python database access]] | ||
Python3.7 on Fedora 28: | Python3.7 on Fedora 28: | ||
Line 20: | Line 64: | ||
* python3.7 get-pip.py | * python3.7 get-pip.py | ||
* python3.7 -m pip install requests | * python3.7 -m pip install requests | ||
+ | |||
+ | Use " | ||
+ | |||
+ | # yum install python2-pip | ||
+ | |||
+ | To list installed python modules: | ||
+ | | ||
+ | $ pip list | ||
+ | | ||
+ | [[https:// | ||
+ | |||
+ | logging.basicConfig(format=' | ||
+ | logging.debug(' | ||
+ | logging.info(' | ||
+ | logging.warning(' | ||
+ | |||
+ | |||
+ | [[https:// |
python_notes.txt · Last modified: 2023/04/05 08:56 by juckins