Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using AITom in Jupyter Notebook and Google Colab #96

Open
evaxguo opened this issue Jun 15, 2020 · 6 comments
Open

Using AITom in Jupyter Notebook and Google Colab #96

evaxguo opened this issue Jun 15, 2020 · 6 comments

Comments

@evaxguo
Copy link
Contributor

evaxguo commented Jun 15, 2020

It would be great if AITom could be used in Jupyter Notebook and Google Colab.

@xulabs
Copy link
Owner

xulabs commented Jun 16, 2020

@evaxguo thanks for the suggestion. You are welcome to discuss with other team members to help to implement this feature.

@geoffwoollard
Copy link

Right now my colab is running Python 3.6.9 and Ubuntu 18.04.5 LTS. I see no reason why I couldn't git clone the aitom repo and install it. I am getting an error thorugh.

cd /
git clone https://github.com/xulabs/aitom.git
cd /aitom
sudo apt-get install python python3-dev fftw3-dev libblas3 liblapack3 libarmadillo-dev
pip install -r requirements.txt
sh clean.sh
sh build.sh
Reading package lists...
Building dependency tree...
Reading state information...
liblapack3 is already the newest version (3.7.1-4ubuntu1).
liblapack3 set to manually installed.
python is already the newest version (2.7.15~rc1-1).
python3-dev is already the newest version (3.6.7-1~18.04).
The following additional packages will be installed:
  libarpack2-dev libblas-dev libfftw3-bin libfftw3-long3 libfftw3-quad3
  libfftw3-single3 libsuperlu-dev
Suggested packages:
  libitpp-dev liblapack-doc libfftw3-doc libsuperlu-doc
The following NEW packages will be installed:
  libarmadillo-dev libarpack2-dev libblas-dev libblas3 libfftw3-bin
  libfftw3-dev libfftw3-long3 libfftw3-quad3 libfftw3-single3 libsuperlu-dev
0 upgraded, 10 newly installed, 0 to remove and 6 not upgraded.
Need to get 4,502 kB of archives.
After this operation, 28.0 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libblas3 amd64 3.7.1-4ubuntu1 [140 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libblas-dev amd64 3.7.1-4ubuntu1 [143 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libarpack2-dev amd64 3.5.0+real-2 [97.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libsuperlu-dev amd64 5.2.1+dfsg1-3 [16.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libarmadillo-dev amd64 1:8.400.0+dfsg-2 [340 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfftw3-long3 amd64 3.3.7-1 [308 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfftw3-quad3 amd64 3.3.7-1 [552 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfftw3-single3 amd64 3.3.7-1 [764 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfftw3-bin amd64 3.3.7-1 [32.7 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfftw3-dev amd64 3.3.7-1 [2,108 kB]
Fetched 4,502 kB in 0s (32.0 MB/s)
Selecting previously unselected package libblas3:amd64.
(Reading database ... 144617 files and directories currently installed.)
Preparing to unpack .../0-libblas3_3.7.1-4ubuntu1_amd64.deb ...
Unpacking libblas3:amd64 (3.7.1-4ubuntu1) ...
Selecting previously unselected package libblas-dev:amd64.
Preparing to unpack .../1-libblas-dev_3.7.1-4ubuntu1_amd64.deb ...
Unpacking libblas-dev:amd64 (3.7.1-4ubuntu1) ...
Selecting previously unselected package libarpack2-dev:amd64.
Preparing to unpack .../2-libarpack2-dev_3.5.0+real-2_amd64.deb ...
Unpacking libarpack2-dev:amd64 (3.5.0+real-2) ...
Selecting previously unselected package libsuperlu-dev:amd64.
Preparing to unpack .../3-libsuperlu-dev_5.2.1+dfsg1-3_amd64.deb ...
Unpacking libsuperlu-dev:amd64 (5.2.1+dfsg1-3) ...
Selecting previously unselected package libarmadillo-dev.
Preparing to unpack .../4-libarmadillo-dev_1%3a8.400.0+dfsg-2_amd64.deb ...
Unpacking libarmadillo-dev (1:8.400.0+dfsg-2) ...
Selecting previously unselected package libfftw3-long3:amd64.
Preparing to unpack .../5-libfftw3-long3_3.3.7-1_amd64.deb ...
Unpacking libfftw3-long3:amd64 (3.3.7-1) ...
Selecting previously unselected package libfftw3-quad3:amd64.
Preparing to unpack .../6-libfftw3-quad3_3.3.7-1_amd64.deb ...
Unpacking libfftw3-quad3:amd64 (3.3.7-1) ...
Selecting previously unselected package libfftw3-single3:amd64.
Preparing to unpack .../7-libfftw3-single3_3.3.7-1_amd64.deb ...
Unpacking libfftw3-single3:amd64 (3.3.7-1) ...
Selecting previously unselected package libfftw3-bin.
Preparing to unpack .../8-libfftw3-bin_3.3.7-1_amd64.deb ...
Unpacking libfftw3-bin (3.3.7-1) ...
Selecting previously unselected package libfftw3-dev:amd64.
Preparing to unpack .../9-libfftw3-dev_3.3.7-1_amd64.deb ...
Unpacking libfftw3-dev:amd64 (3.3.7-1) ...
Setting up libfftw3-quad3:amd64 (3.3.7-1) ...
Setting up libblas3:amd64 (3.7.1-4ubuntu1) ...
Setting up libarpack2-dev:amd64 (3.5.0+real-2) ...
Setting up libfftw3-single3:amd64 (3.3.7-1) ...
Setting up libfftw3-long3:amd64 (3.3.7-1) ...
Setting up libfftw3-bin (3.3.7-1) ...
Setting up libblas-dev:amd64 (3.7.1-4ubuntu1) ...
Setting up libsuperlu-dev:amd64 (5.2.1+dfsg1-3) ...
Setting up libfftw3-dev:amd64 (3.3.7-1) ...
Setting up libarmadillo-dev (1:8.400.0+dfsg-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
/sbin/ldconfig.real: /usr/local/lib/python3.6/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link

Requirement already satisfied: cython in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 1)) (0.29.21)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 2)) (1.18.5)
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 3)) (1.4.1)
Requirement already satisfied: sklearn in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 4)) (0.0)
Collecting mrcfile
  Downloading https://files.pythonhosted.org/packages/79/aa/52aa135830f66259783207021849a8234551fc5e3db15f685201cb3d1bfa/mrcfile-1.1.2-py2.py3-none-any.whl (41kB)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 6)) (3.2.2)
Collecting pypng
  Downloading https://files.pythonhosted.org/packages/bc/fb/f719f1ac965e2101aa6ea6f54ef8b40f8fbb033f6ad07c017663467f5147/pypng-0.0.20.tar.gz (649kB)
Requirement already satisfied: tensorflow in /usr/local/lib/python3.6/dist-packages (from -r requirements.txt (line 8)) (2.3.0)
Collecting keras==2.1.0
  Downloading https://files.pythonhosted.org/packages/bf/c2/b0c2ece713e754d1692aa432ad682751cd1ad6abf7500a534558b1fbfbe7/Keras-2.1.0-py2.py3-none-any.whl (302kB)
Collecting lsm-db
  Downloading https://files.pythonhosted.org/packages/17/f2/dc68ecdece424eb206c42b8db924c5a7f6dd97d26df42a1c9fb41a6fe555/lsm-db-0.6.4.tar.gz (316kB)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.6/dist-packages (from sklearn->-r requirements.txt (line 4)) (0.22.2.post1)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->-r requirements.txt (line 6)) (1.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->-r requirements.txt (line 6)) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->-r requirements.txt (line 6)) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->-r requirements.txt (line 6)) (2.4.7)
Requirement already satisfied: tensorboard<3,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (2.3.0)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.1.0)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (2.3.0)
Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.12.1)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (2.10.0)
Requirement already satisfied: gast==0.3.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (0.3.3)
Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (0.35.1)
Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.15.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.32.0)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.1.2)
Requirement already satisfied: astunparse==1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (1.6.3)
Requirement already satisfied: protobuf>=3.9.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (3.12.4)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (3.3.0)
Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (0.10.0)
Requirement already satisfied: google-pasta>=0.1.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow->-r requirements.txt (line 8)) (0.2.0)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.6/dist-packages (from keras==2.1.0->-r requirements.txt (line 9)) (3.13)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.6/dist-packages (from scikit-learn->sklearn->-r requirements.txt (line 4)) (0.16.0)
Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (50.3.0)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (2.23.0)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (0.4.1)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (3.2.2)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (1.7.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (1.17.2)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (1.24.3)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (2.10)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (1.3.0)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (2.0.0)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3" in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (4.6)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (4.1.1)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (3.1.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < "3.8"->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (3.2.0)
Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.6/dist-packages (from rsa<5,>=3.1.4; python_version >= "3"->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow->-r requirements.txt (line 8)) (0.4.8)
Building wheels for collected packages: pypng, lsm-db
  Building wheel for pypng (setup.py): started
  Building wheel for pypng (setup.py): finished with status 'done'
  Created wheel for pypng: filename=pypng-0.0.20-cp36-none-any.whl size=67162 sha256=c4f09a8c98fa4e8e51ffe63b58fdf2b5e6b6557e3607c1f1597f7473439ff79c
  Stored in directory: /root/.cache/pip/wheels/41/6b/ef/0493b536b6d4722c2ae9486691b1d49b922b9877922beeabb3
  Building wheel for lsm-db (setup.py): started
  Building wheel for lsm-db (setup.py): finished with status 'done'
  Created wheel for lsm-db: filename=lsm_db-0.6.4-cp36-cp36m-linux_x86_64.whl size=664712 sha256=9dff42c17e3c01c842ce47b6c0234f755f87871906b1b11201afcf0e67d3d907
  Stored in directory: /root/.cache/pip/wheels/ed/32/8a/b0f3aa15b68f1e6b8f2dcc6285de4796b6b58af71c5f280f48
Successfully built pypng lsm-db
Installing collected packages: mrcfile, pypng, keras, lsm-db
  Found existing installation: Keras 2.4.3
    Uninstalling Keras-2.4.3:
      Successfully uninstalled Keras-2.4.3
Successfully installed keras-2.1.0 lsm-db-0.6.4 mrcfile-1.1.2 pypng-0.0.20
Compiling aitom/tomominer/core/cython/core.pyx because it changed.
[1/1] Cythonizing aitom/tomominer/core/cython/core.pyx
running build_ext
building 'aitom.tomominer.core.core' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/aitom
creating build/temp.linux-x86_64-3.6/aitom/tomominer
creating build/temp.linux-x86_64-3.6/aitom/tomominer/core
creating build/temp.linux-x86_64-3.6/aitom/tomominer/core/cython
creating build/temp.linux-x86_64-3.6/aitom/tomominer/core/src
creating build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/segmentation
creating build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/segmentation/watershed
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/cython/core.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/cython/core.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/cython/wrap_core.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/cython/wrap_core.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/affine_transform.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/affine_transform.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/align.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/align.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/arma_extend.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/arma_extend.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/dilate.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/dilate.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/fft.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/fft.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/geometry.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/geometry.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/interpolation.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/interpolation.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/io.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/io.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/legendre.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/legendre.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/rotate.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/rotate.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/sht.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/sht.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/wigner.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/wigner.o -std=c++11
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iaitom/tomominer/core/cython -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -Iaitom/tomominer/core/src/ -I/aitom/ext/include -I/usr/include/python3.6m -c aitom/tomominer/core/src/segmentation/watershed/watershed_segmentation.cpp -o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/segmentation/watershed/watershed_segmentation.o -std=c++11
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/aitom/tomominer/core/cython/core.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/cython/wrap_core.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/affine_transform.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/align.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/arma_extend.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/dilate.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/fft.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/geometry.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/interpolation.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/io.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/legendre.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/rotate.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/sht.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/wigner.o build/temp.linux-x86_64-3.6/aitom/tomominer/core/src/segmentation/watershed/watershed_segmentation.o -L/aitom/ext/lib -lm -lfftw3 -larmadillo -lblas -llapack -o /aitom/aitom/tomominer/core/core.cpython-36m-x86_64-linux-gnu.so
Cloning into 'aitom'...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 10.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
ERROR: textgenrnn 1.4.1 has requirement keras>=2.1.5, but you'll have keras 2.1.0 which is incompatible.
In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                 from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from aitom/tomominer/core/cython/core.cpp:677:
/usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^~~~~~~
aitom/tomominer/core/cython/core.cpp: In function ‘PyObject* __pyx_pf_5aitom_9tomominer_4core_4core_4combined_search(PyObject*, PyArrayObject*, PyArrayObject*, PyArrayObject*, PyArrayObject*, unsigned int)’:
aitom/tomominer/core/cython/core.cpp:3597:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
                        ~~~~~~~~~~~^~~~~~~~~~~~
aitom/tomominer/core/cython/core.cpp: In function ‘PyObject* __pyx_pf_5aitom_9tomominer_4core_4core_8local_max_angles(PyObject*, PyArrayObject*, unsigned int)’:
aitom/tomominer/core/cython/core.cpp:4823:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
                        ~~~~~~~~~~~^~~~~~~~~~~~
In file included from aitom/tomominer/core/cython/wrap_core.cpp:9:0:
aitom/tomominer/core/src/segmentation/active_contour/zy_binary_boundary_detection.hpp: In function ‘void zy_BinaryBoundaryDetection(char*, int, int, int, int, char*)’:
aitom/tomominer/core/src/segmentation/active_contour/zy_binary_boundary_detection.hpp:15:26: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
  int i, j, k, idx, idx0, count;
                          ^~~~~
aitom/tomominer/core/src/segmentation/active_contour/zy_binary_boundary_detection.hpp:16:6: warning: unused variable ‘on_boundary’ [-Wunused-variable]
  int on_boundary = 0;
      ^~~~~~~~~~~
In file included from aitom/tomominer/core/cython/wrap_core.cpp:10:0:
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp: In instantiation of ‘void div_AOS_3D(C3DImage<double>&, T&, double, C3DImage<double>&) [with T = C3DImage<double>]’:
aitom/tomominer/core/cython/wrap_core.cpp:214:38:   required from here
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:195:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(j = 0; j < g.m_dims[0]; j++)
                ~~^~~~~~~~~~~
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:197:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(k = 0; k < g.m_dims[1]; k++)
                    ~~^~~~~~~~~~~
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:213:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(j = 0; j < g.m_dims[0]; j++)
                ~~^~~~~~~~~~~
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:215:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(k = 0; k < g.m_dims[2]; k++)
                    ~~^~~~~~~~~~~
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:228:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(j = 0; j < g.m_dims[1]; j++)
                ~~^~~~~~~~~~~
aitom/tomominer/core/src/segmentation/active_contour/ac_div_AOS_3D_dll.hpp:230:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(k = 0; k < g.m_dims[2]; k++)
                    ~~^~~~~~~~~~~
aitom/tomominer/core/src/dilate.cpp: In function ‘arma::cube dilate_small_se(const cube&, int)’:
aitom/tomominer/core/src/dilate.cpp:47:35: warning: ‘static eT arma::Math<eT>::inf() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
     arma::cube out = -arma::math::inf() * arma::ones<arma::cube>(vol.n_rows, vol.n_cols, vol.n_slices);
                                   ^~~
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/dilate.cpp:2:
/usr/include/armadillo_bits/constants_old.hpp:62:29: note: declared here
   arma_deprecated static eT inf()       { return priv::Datum_helper::inf<eT>(); }  // use datum::inf instead
                             ^~~
aitom/tomominer/core/src/dilate.cpp:47:39: warning: ‘static eT arma::Math<eT>::inf() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
     arma::cube out = -arma::math::inf() * arma::ones<arma::cube>(vol.n_rows, vol.n_cols, vol.n_slices);
                                       ^
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/dilate.cpp:2:
/usr/include/armadillo_bits/constants_old.hpp:62:29: note: declared here
   arma_deprecated static eT inf()       { return priv::Datum_helper::inf<eT>(); }  // use datum::inf instead
                             ^~~
aitom/tomominer/core/src/interpolation.cpp: In constructor ‘interpolater::interpolater(const cube&)’:
aitom/tomominer/core/src/interpolation.cpp:14:78: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
 interpolater::interpolater(const arma::cube &f_) : data(f_), ext(arma::math::nan()) {}
                                                                              ^~~
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/interpolation.cpp:2:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
aitom/tomominer/core/src/interpolation.cpp:14:82: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
 interpolater::interpolater(const arma::cube &f_) : data(f_), ext(arma::math::nan()) {}
                                                                                  ^
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/interpolation.cpp:2:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
aitom/tomominer/core/src/rotate.cpp:13:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
     #pragma omp parallel for private(x,y)
 
aitom/tomominer/core/src/rotate.cpp: In function ‘arma::cube rotate_vol(const cube&, const rot_matrix&, const vec3&)’:
aitom/tomominer/core/src/rotate.cpp:48:49: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
     cubic_interpolater cub_int(vol, arma::math::nan());
                                                 ^~~
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/rotate.hpp:4,
                 from aitom/tomominer/core/src/rotate.cpp:1:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
aitom/tomominer/core/src/rotate.cpp:48:53: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
     cubic_interpolater cub_int(vol, arma::math::nan());
                                                     ^
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/rotate.hpp:4,
                 from aitom/tomominer/core/src/rotate.cpp:1:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
aitom/tomominer/core/src/wigner.cpp: In function ‘std::vector<arma::Mat<double> > wigner_d(double, int)’:
aitom/tomominer/core/src/wigner.cpp:35:33: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
         D.push_back(arma::math::nan() * arma::ones<arma::mat>(2*l+1,2*l+1));
                                 ^~~
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/wigner.cpp:3:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
aitom/tomominer/core/src/wigner.cpp:35:37: warning: ‘static eT arma::Math<eT>::nan() [with eT = double]’ is deprecated [-Wdeprecated-declarations]
         D.push_back(arma::math::nan() * arma::ones<arma::mat>(2*l+1,2*l+1));
                                     ^
In file included from /usr/include/armadillo:119:0,
                 from aitom/tomominer/core/src/wigner.cpp:3:
/usr/include/armadillo_bits/constants_old.hpp:59:29: note: declared here
   arma_deprecated static eT nan()       { return priv::Datum_helper::nan<eT>(); }  // use datum::nan instead
                             ^~~
/usr/local/lib/python3.6/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /aitom/aitom/tomominer/core/cython/core.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

@geoffwoollard
Copy link

The error seems to be with the version of keras. The requirements.txt file has keras==2.1.0. I took out the specific version and just put in keras, but that didn't solve the issue.

@xulabs
Copy link
Owner

xulabs commented Oct 6, 2020

@geoffwoollard generally only the fast subtomogram alignment part involves c++ code. If you don't use the subtomogram alignment, then you can just clone the library without compiling it.

The c++ code depends on an older version of armadillo. You are very welcome to help us to update the c++ code so that it is compatible with the current version of armadillo.

@Shadowalker1995
Copy link
Contributor

Shadowalker1995 commented Oct 7, 2020

@geoffwoollard I see that your machine use x86_64-linux-gnu-gcc as the default GCC compiler. I have also encountered some compile errors with this compiler. So, I recommend you add the following two lines in the setup.py file:

os.environ["CC"] = "gcc"
os.environ["CXX"] = "gcc"

It works fine for me.

@genio0815
Copy link

Hi all,

so, removing the version specification of keras will work (2.1.0 seems to be due to #20, won't run py > 3.6 and more recent versions of tf)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants