kuroの覚え書き

96の個人的覚え書き

python 状況整理

メインサーバ(RX1330M3)

$ which python3
/home/linuxbrew/.linuxbrew/bin/python3
$ python3 --version
Python 3.9.7
$ python3 -m pip list
Package               Version
--------------------- ---------
alembic               1.7.1
beautifulsoup4        4.10.0
biopython             1.79
bleach                4.1.0
bokeh                 2.3.3
certifi               2021.5.30
charset-normalizer    2.0.4
click                 8.0.1
configparser          5.0.2
cycler                0.10.0
dominate              2.6.0
Flask                 1.1.2
Flask-Bootstrap       3.3.7.1
flask-ldap3-login     0.9.16
Flask-Login           0.5.0
Flask-Migrate         3.1.0
Flask-Moment          1.0.2
Flask-Script          2.0.6
Flask-SQLAlchemy      2.5.1
Flask-WTF             0.15.1
greenlet              1.1.1
idna                  3.2
itsdangerous          2.0.1
Jinja2                3.0.1
joblib                1.0.1
kiwisolver            1.3.2
ldap3                 2.9.1
libxml2-python        2.9.12
Mako                  1.1.5
Markdown              3.3.4
MarkupSafe            2.0.1
matplotlib            3.4.3
meson                 0.59.1
msgpack-python        0.5.6
msgpack-tool          0.0.1
numpy                 1.21.2
packaging             21.0
pandas                1.3.2
panel                 0.12.1
param                 1.11.1
patsy                 0.5.1
Pillow                8.3.2
pip                   21.2.4
pyasn1                0.4.8
pyct                  0.4.8
PyMySQL               1.0.2
pyparsing             2.4.7
PyQt3D                5.15.4
PyQt5                 5.15.4
PyQt5-sip             12.9.0
PyQtChart             5.15.4
PyQtDataVisualization 5.15.4
PyQtNetworkAuth       5.15.4
PyQtPurchasing        5.15.4
pysam                 0.16.0.1
python-dateutil       2.8.2
pytz                  2021.1
PyVCF                 0.6.8
pyviz-comms           2.1.0
PyYAML                5.4.1
regex                 2021.8.28
requests              2.26.0
scikit-learn          0.24.2
scipy                 1.7.1
seaborn               0.11.2
setuptools            57.4.0
sip                   6.1.1
six                   1.16.0
sklearn               0.0
soupsieve             2.2.1
SQLAlchemy            1.4.23
statsmodels           0.12.2
TBB                   0.2
threadpoolctl         2.2.0
toml                  0.10.2
tornado               6.1
tqdm                  4.62.2
typing-extensions     3.10.0.2
urllib3               1.26.6
visitor               0.1.3
webencodings          0.5.1
Werkzeug              2.0.1
wheel                 0.37.0
WTForms               2.3.3


GPUサーバ(TX1310M3)

$ which python3
/home/linuxbrew/.linuxbrew/bin/python3
$ python3 --version
Python 3.9.6
$ python3 -m pip list
Package                           Version
--------------------------------- -------
backports.entry-points-selectable 1.1.0
distlib                           0.3.2
filelock                          3.0.12
pip                               21.2.4
platformdirs                      2.2.0
setuptools                        57.0.0
six                               1.16.0
virtualenv                        20.7.2
wheel                             0.36.2

virtualenvで環境切り分け
Alphafold2(Docker)用として使うときは

$ cd ~/alphafold
$ source alphafold/bin/activate
$ python3 -m pip list
Package                 Version
----------------------- -------------------
absl-py                 0.13.0
astunparse              1.6.3
biopython               1.79
cachetools              4.2.2
certifi                 2021.5.30
charset-normalizer      2.0.4
chex                    0.0.7
contextlib2             21.6.0
dm-haiku                0.0.4
dm-tree                 0.1.6
docker                  5.0.0
flatbuffers             1.12
gast                    0.4.0
google-auth             1.35.0
google-auth-oauthlib    0.4.5
google-pasta            0.2.0
grpcio                  1.34.1
h5py                    3.1.0
idna                    3.2
immutabledict           2.0.0
jax                     0.2.14
jaxlib                  0.1.70
keras-nightly           2.5.0.dev2021032900
Keras-Preprocessing     1.1.2
Markdown                3.3.4
ml-collections          0.1.0
numpy                   1.19.5
oauthlib                3.1.1
opt-einsum              3.3.0
pip                     21.2.4
protobuf                3.17.3
pyasn1                  0.4.8
pyasn1-modules          0.2.8
PyYAML                  5.4.1
requests                2.26.0
requests-oauthlib       1.3.0
rsa                     4.7.2
scipy                   1.7.0
setuptools              57.4.0
six                     1.15.0
tabulate                0.8.9
tensorboard             2.6.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit  1.8.0
tensorflow-cpu          2.5.0
tensorflow-estimator    2.5.0
termcolor               1.1.0
toolz                   0.11.1
typing-extensions       3.7.4.3
urllib3                 1.26.6
websocket-client        1.2.1
Werkzeug                2.0.1
wheel                   0.37.0
wrapt                   1.12.1

のように切り替える。


Mac mini (2018)

$ which python3
/usr/local/bin/python3    #brewで入れたpython3
$ python3 --version
Python 3.9.6
$ python3 -m pip list
Package                 Version
----------------------- -------
mmtf-python             1.1.2
msgpack                 1.0.2
numpy                   1.21.2
packaging               20.9
pip                     21.1.3
Pmw                     2.1
pymol                   2.4.0
pyparsing               2.4.7
PyQt3D                  5.15.4
PyQt5                   5.15.4
PyQt5-sip               12.9.0
PyQt6                   6.1.1
PyQt6-3D                6.1.1
PyQt6-Charts            6.1.1
PyQt6-DataVisualization 6.1.1
PyQt6-NetworkAuth       6.1.1
PyQt6-sip               13.1.0
PyQtChart               5.15.4
PyQtDataVisualization   5.15.4
PyQtNetworkAuth         5.15.4
PyQtPurchasing          5.15.4
PyQtWebEngine           5.15.4
setuptools              57.0.0
sip                     6.1.1
TBB                     0.2
toml                    0.10.2
wheel                   0.36.2


MacBook Air (Retina, 13-inch, 2020)

% which python3
/Users/kuro/.pyenv/shims/python3
% pyenv versions               
  system
* 3.8.6 (set by /Users/kuro/.pyenv/version)
  anaconda3-5.3.1
  anaconda3-5.3.1/envs/usml
% python3 --version
Python 3.8.6
% python3 -m pip list   
Package             Version
------------------- -------
appnope             0.1.1
argon2-cffi         20.1.0
async-generator     1.10
attrs               20.3.0
backcall            0.2.0
biopython           1.78
bleach              3.2.1
cffi                1.14.4
click               7.1.2
cycler              0.10.0
decorator           4.4.2
defusedxml          0.6.0
entrypoints         0.3
Flask               1.1.2
greenlet            1.0.0
ipykernel           5.3.4
ipython             7.19.0
ipython-genutils    0.2.0
ipywidgets          7.5.1
itsdangerous        1.1.0
jedi                0.17.2
Jinja2              2.11.2
joblib              0.17.0
jsonschema          3.2.0
jupyter             1.0.0
jupyter-client      6.1.7
jupyter-console     6.2.0
jupyter-core        4.7.0
jupyterlab-pygments 0.1.2
kiwisolver          1.3.1
MarkupSafe          1.1.1
matplotlib          3.3.3
mistune             0.8.4
nbclient            0.5.1
nbconvert           6.0.7
nbformat            5.0.8
nest-asyncio        1.4.3
notebook            6.1.5
numpy               1.19.4
packaging           20.7
pandas              1.1.4
pandocfilters       1.4.3
parso               0.7.1
patsy               0.5.1
pexpect             4.8.0
pickleshare         0.7.5
Pillow              8.0.1
pip                 21.2.4
prometheus-client   0.9.0
prompt-toolkit      3.0.8
ptyprocess          0.6.0
pycparser           2.20
Pygments            2.7.2
pyparsing           2.4.7
pyrsistent          0.17.3
python-dateutil     2.8.1
pytz                2020.4
pyzmq               20.0.0
qtconsole           5.0.1
QtPy                1.9.0
scikit-learn        0.23.2
scipy               1.5.4
seaborn             0.11.0
Send2Trash          1.5.0
setuptools          49.2.1
six                 1.15.0
sklearn             0.0
somoclu             1.7.5
SQLAlchemy          1.4.4
statsmodels         0.12.1
terminado           0.9.1
testpath            0.4.4
threadpoolctl       2.1.0
tornado             6.1
traitlets           5.0.5
wcwidth             0.2.5
webencodings        0.5.1
Werkzeug            1.0.1
widgetsnbextension  3.5.1

pyenvをbrewでインストールしている。
通常は3.8.6で、機械学習のテスト用にanaconda3-5.3.1(Python 3.7.0)をインストール。

% pyenv global anaconda3-5.3.1/envs/usml
% pyenv versions                        
  system
  3.8.6
  anaconda3-5.3.1
* anaconda3-5.3.1/envs/usml (set by /Users/kuro/.pyenv/version)
% python --version                      
Python 3.6.10 :: Anaconda, Inc.
% python3 -m pip list                     
Package                            Version
---------------------------------- -------------------
alabaster                          0.7.12
anaconda-client                    1.7.2
anaconda-project                   0.8.3
applaunchservices                  0.2.1
appnope                            0.1.0
appscript                          1.1.1
argh                               0.26.2
asn1crypto                         1.3.0
astroid                            2.4.2
astropy                            4.0.1.post1
atomicwrites                       1.4.0
attrs                              19.3.0
autopep8                           1.5.3
Babel                              2.8.0
backcall                           0.2.0
backports.shutil-get-terminal-size 1.0.0
beautifulsoup4                     4.9.1
bitarray                           1.4.0
bkcharts                           0.2
bleach                             3.1.5
bokeh                              2.1.1
boto                               2.49.0
Bottleneck                         1.3.2
brotlipy                           0.7.0
certifi                            2020.6.20
cffi                               1.14.0
chardet                            3.0.4
click                              7.1.2
cloudpickle                        1.5.0
clyent                             1.2.2
colorama                           0.4.3
contextlib2                        0.6.0.post1
contextvars                        2.4
cryptography                       2.9.2
cycler                             0.10.0
Cython                             0.29.21
cytoolz                            0.10.1
dask                               2.20.0
decorator                          4.4.2
defusedxml                         0.6.0
diff-match-patch                   20200713
distributed                        2.20.0
docutils                           0.16
entrypoints                        0.3
et-xmlfile                         1.0.1
fastcache                          1.1.0
filelock                           3.0.12
flake8                             3.8.3
Flask                              1.1.2
fsspec                             0.7.4
future                             0.18.2
gevent                             20.6.2
glob2                              0.7
gmpy2                              2.0.8
greenlet                           0.4.16
h5py                               2.10.0
HeapDict                           1.0.1
html5lib                           1.1
idna                               2.10
imageio                            2.9.0
imagesize                          1.2.0
immutables                         0.14
importlib-metadata                 1.7.0
intervaltree                       3.0.2
ipykernel                          5.3.2
ipython                            7.16.1
ipython-genutils                   0.2.0
ipywidgets                         7.5.1
isort                              4.3.21
itsdangerous                       1.1.0
jdcal                              1.4.1
jedi                               0.17.1
Jinja2                             2.11.2
joblib                             0.16.0
json5                              0.9.5
jsonschema                         3.2.0
jupyter                            1.0.0
jupyter-client                     6.1.6
jupyter-console                    6.1.0
jupyter-core                       4.6.3
jupyterlab                         2.1.5
jupyterlab-server                  1.2.0
keyring                            21.2.1
kiwisolver                         1.2.0
lazy-object-proxy                  1.4.3
libarchive-c                       2.9
llvmlite                           0.33.0+1.g022ab0f
locket                             0.2.0
lxml                               4.5.2
MarkupSafe                         1.1.1
matplotlib                         3.2.2
mccabe                             0.6.1
mistune                            0.8.4
mkl-fft                            1.0.14
mkl-random                         1.0.4
mkl-service                        2.3.0
mock                               4.0.2
more-itertools                     8.4.0
mpmath                             1.1.0
msgpack                            1.0.0
multipledispatch                   0.6.0
nbconvert                          5.6.1
nbformat                           5.0.7
networkx                           2.4
nltk                               3.5
nose                               1.3.7
notebook                           6.0.3
numba                              0.50.1
numexpr                            2.7.1
numpy                              1.17.0
numpydoc                           1.1.0
olefile                            0.46
openpyxl                           3.0.4
packaging                          20.4
pandas                             1.0.5
pandocfilters                      1.4.2
parso                              0.7.0
partd                              1.1.0
path                               13.1.0
pathlib2                           2.3.5
pathtools                          0.1.2
patsy                              0.5.1
pep8                               1.7.1
pexpect                            4.8.0
pickleshare                        0.7.5
Pillow                             7.2.0
pip                                20.1.1
pkginfo                            1.5.0.1
pluggy                             0.13.1
ply                                3.11
prometheus-client                  0.8.0
prompt-toolkit                     3.0.5
psutil                             5.7.0
ptyprocess                         0.6.0
py                                 1.9.0
pycodestyle                        2.6.0
pycosat                            0.6.3
pycparser                          2.20
pycrypto                           2.6.1
pycurl                             7.43.0.5
pydocstyle                         5.0.2
pyflakes                           2.2.0
Pygments                           2.6.1
pylint                             2.5.3
pyodbc                             4.0.0-unsupported
pyOpenSSL                          19.1.0
pyparsing                          2.4.7
pyrsistent                         0.16.0
PySocks                            1.7.1
pytest                             5.4.3
python-dateutil                    2.8.1
python-jsonrpc-server              0.3.4
python-language-server             0.34.1
pytz                               2020.1
PyWavelets                         1.1.1
PyYAML                             5.3.1
pyzmq                              19.0.1
QDarkStyle                         2.8.1
QtAwesome                          0.7.2
qtconsole                          4.7.5
QtPy                               1.9.0
regex                              2020.6.8
requests                           2.24.0
rope                               0.17.0
Rtree                              0.9.4
ruamel-yaml                        0.15.87
scikit-image                       0.16.2
scikit-learn                       0.23.1
scipy                              1.5.0
seaborn                            0.10.1
Send2Trash                         1.5.0
setuptools                         49.2.0.post20200714
simplegeneric                      0.8.1
singledispatch                     3.4.0.3
six                                1.15.0
snowballstemmer                    2.0.0
sortedcollections                  1.2.1
sortedcontainers                   2.2.2
soupsieve                          2.0.1
Sphinx                             3.1.2
sphinxcontrib-applehelp            1.0.2
sphinxcontrib-devhelp              1.0.2
sphinxcontrib-htmlhelp             1.0.3
sphinxcontrib-jsmath               1.0.1
sphinxcontrib-qthelp               1.0.3
sphinxcontrib-serializinghtml      1.1.4
sphinxcontrib-websupport           1.2.3
spyder                             4.1.4
spyder-kernels                     1.9.2
SQLAlchemy                         1.3.18
statsmodels                        0.11.1
sympy                              1.6.1
tables                             3.6.1
tblib                              1.6.0
terminado                          0.8.3
testpath                           0.4.4
threadpoolctl                      2.1.0
toml                               0.10.1
toolz                              0.10.0
tornado                            6.0.4
tqdm                               4.47.0
traitlets                          4.3.3
typed-ast                          1.4.1
typing-extensions                  3.7.4.2
ujson                              1.35
unicodecsv                         0.14.1
urllib3                            1.25.9
watchdog                           0.10.3
wcwidth                            0.2.5
webencodings                       0.5.1
Werkzeug                           1.0.1
wheel                              0.34.2
widgetsnbextension                 3.5.1
wrapt                              1.11.2
wurlitzer                          2.0.1
xlrd                               1.2.0
XlsxWriter                         1.2.9
xlwings                            0.19.5
xlwt                               1.2.0
yapf                               0.30.0
zict                               2.0.0
zipp                               3.1.0
zope.event                         4.4
zope.interface                     4.7.1