-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_python
126 lines (113 loc) · 6.18 KB
/
install_python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
## install tcl ##
cd unix; ./configure --prefix=/opt/libs/tcl/8.6.8; make –j 20 ; make install
## install tk ##
cd unix; ./configure --prefix=/opt/libs/tk/8.6.8 --with-tcl=/opt/libs/tcl/8.6.8/lib; make -j 20; make install
## install bzip2 source ###
unzip
make -f Makefile-libbz2_so
make install PREFIX=/opt/bzip2/1.0.6
Manually copy libbz2.so* into /opt/bzip2/1.0.6/lib
## Python ##
make sure readline library is installed
install sqlite3 development rpm or hack setup.py for the location of sqlite3 if custom install is made. This is necessary for pysqlite or jupyter notebook
Adjust or add LDFLAGS and CPPFLAGS to include the library and the header of bzip2. This will produce _bzip2***.so
export LD_LIBRARY_PATH+=:/opt/libs/tcl/8.6.8/lib:/opt/libs/tk/8.6.8/lib # if this is not done, _tkinter will not be built
#export C_INCLUDE_PATH+=:/opt/apps/bzip2/1.0.6/include; export INCLUDE=$C_INCLUDE_PATH
./configure --prefix=/opt/apps/python_custorm/3.6.3 --enable-shared --with-ensurepip=install \
--with-tcltk-includes="-I/opt/libs/tcl/8.6.8/include -I/opt/libs/tk/8.6.8/include" \
--with-tcltk-libs="-L/opt/libs/tcl/8.6.8/lib -ltcl8.6 -L/opt/libs/tk/8.6.8/lib -ltk8.6“ \
CPPFLAGS="-I/opt/apps/bzip2/1.0.6/include" LDFLAGS="-L/opt/apps/bzip2/1.0.6/lib"
- if quotation in CPPFLAGS and LDFLAGS are not given, bzip2 will not be built
make –j 20; # check if there is any module failed to build
make install
- If linking readline libs yields `/libreadline.so: undefined refer ence to `tgetstr'`, couple with ncurses lib. In LDFLAGS, ncurses lib must be prior to readline
- For tcltk lib, --with-tcltk-libs might be used
- When system library doesn't have readline and ncurses, add the location of those libraries into LDFLAGS in the configure command.
- Also head the header file location into CPPFLAGS
- Installing on RHEL6 may need ncurses5
# the order of packges to install jupyter notebook
traitlets==4.3.2
tornado-6.0.3.tar.gz
jupyter_core-4.5.0-py2.py3-none-any.whl
jupyter_client-5.3.1-py2.py3-none-any.whl
pyzmq-18.1.0-cp36-cp36m-manylinux1_x86_64.whl
pickleshare-0.7.5-py2.py3-none-any.whl
wcwidth-0.1.7.tar.gz
prompt_toolkit-2.0.9-py3-none-any.whl
parso-0.5.1.tar.gz
jedi-0.15.1.tar.gz
ptyprocess-0.6.0-py2.py3-none-any.whl
pexpect-4.7.0.tar.gz
Pygments-2.4.2.tar.gz
backcall-0.1.0.tar.gz
ipython-7.7.0-py3-none-any.whl
ipykernel-5.1.1-py3-none-any.whl
ipython_genutils-0.2.0-py2.py3-none-any.whl
pycosat-0.6.3.zip
jupyter_console-6.0.0-py2.py3-none-any.whl
terminado-0.8.2-py2.py3-none-any.whl
prometheus_client-0.7.1.tar.gz
attrs-19.1.0-py2.py3-none-any.whl
pyrsistent-0.15.4.tar.gz
jsonschema-3.0.2-py2.py3-none-any.whl
pandocfilters-1.4.2.tar.gz
testpath-0.4.2-py2.py3-none-any.whl
defusedxml-0.6.0-py2.py3-none-any.whl
entrypoints-0.3-py2.py3-none-any.whl
nbformat-4.4.0-py2.py3-none-any.whl
mistune-0.8.4-py2.py3-none-any.whl
webencodings-0.5.1-py2.py3-none-any.whl
bleach-3.1.0-py2.py3-none-any.whl
nbconvert-5.6.0-py2.py3-none-any.whl
Send2Trash-1.5.0-py3-none-any.whl
notebook-6.0.0-py3-none-any.whl
# finding dependency from each wheel
- copy wheel file like aaa.zip
- unzip aaa.zip
- From packagename.dist-info/METADATA, can find the list of dependent packages
# convert ipynb into python script
- jupyter nbconvert --to script Untitled.ipynb
# pymeep
- Regular python build or pypi will not be able to install pymeep from conda package
- Use miniconda
- conda config --set allow_conda_downgrades true
```
Total: 53.1 MB
The following NEW packages will be INSTALLED:
_openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-1_gnu
c-ares conda-forge/linux-64::c-ares-1.17.1-h7f98852_1
cached-property conda-forge/noarch::cached-property-1.5.2-hd8ed1ab_1
cached_property conda-forge/noarch::cached_property-1.5.2-pyha770c72_1
fftw conda-forge/linux-64::fftw-3.3.9-nompi_h74d3f13_101
gsl conda-forge/linux-64::gsl-2.6-he838d99_2
h5py conda-forge/linux-64::h5py-3.1.0-nompi_py37h1e651dc_100
harminv conda-forge/linux-64::harminv-1.4.1-hbf3b5f1_1007
hdf5 conda-forge/linux-64::hdf5-1.10.6-nompi_h6a2412b_1114
krb5 pkgs/main/linux-64::krb5-1.17.1-h173b8e3_0
libblas conda-forge/linux-64::libblas-3.9.0-8_openblas
libcblas conda-forge/linux-64::libcblas-3.9.0-8_openblas
libctl conda-forge/linux-64::libctl-4.5.0-h7f98852_2
libcurl conda-forge/linux-64::libcurl-7.75.0-hc4aaa36_0
libev conda-forge/linux-64::libev-4.33-h516909a_1
libgdsii conda-forge/linux-64::libgdsii-0.21-h4bd325d_4
libgfortran-ng conda-forge/linux-64::libgfortran-ng-9.3.0-hff62375_18
libgfortran5 conda-forge/linux-64::libgfortran5-9.3.0-hff62375_18
libgomp conda-forge/linux-64::libgomp-9.3.0-h2828fa1_18
liblapack conda-forge/linux-64::liblapack-3.9.0-8_openblas
libnghttp2 conda-forge/linux-64::libnghttp2-1.43.0-h812cca2_0
libopenblas conda-forge/linux-64::libopenblas-0.3.12-pthreads_h4812303_1
libssh2 conda-forge/linux-64::libssh2-1.9.0-ha56f1ee_6
mpb conda-forge/linux-64::mpb-1.11.1-nompi_hed98f5b_103
numpy conda-forge/linux-64::numpy-1.20.2-py37h038b26d_0
pymeep conda-forge/linux-64::pymeep-1.18.0-nompi_py37h1234567_101
python_abi conda-forge/linux-64::python_abi-3.7-1_cp37m
The following packages will be UPDATED:
ca-certificates pkgs/main::ca-certificates-2019.10.16~ --> conda-forge::ca-certificates-2020.12.5-ha878542_0
certifi pkgs/main::certifi-2019.9.11-py37_0 --> conda-forge::certifi-2020.12.5-py37h89c1867_1
conda pkgs/main::conda-4.7.12-py37_0 --> conda-forge::conda-4.9.2-py37h89c1867_0
libgcc-ng pkgs/main::libgcc-ng-9.1.0-hdf63c60_0 --> conda-forge::libgcc-ng-9.3.0-h2828fa1_18
libstdcxx-ng pkgs/main::libstdcxx-ng-9.1.0-hdf63c6~ --> conda-forge::libstdcxx-ng-9.3.0-h6de172a_18
openssl pkgs/main::openssl-1.1.1d-h7b6447c_3 --> conda-forge::openssl-1.1.1k-h7f98852_0
The following packages will be SUPERSEDED by a higher-priority channel:
_libgcc_mutex pkgs/main::_libgcc_mutex-0.1-main --> conda-forge::_libgcc_mutex-0.1-conda_forge
```