nyuvis / patient-viz

Visualization of electronic medical records or other sequence event data.
MIT License
90 stars 29 forks source link

Setup issue #59

Open SeeMJ opened 7 years ago

SeeMJ commented 7 years ago

I was trying to install this project on my Mac. I have Anaconda v2.7 distribution installed. I have all the required packages installed as well. Here is the console output that I got by running ./setup.sh --default-omop:

--------------------- Console Ouput -------------------
Submodule 'lib/jk-js' (https://github.com/JosuaKrause/jk-js.git) registered for path 'lib/jk-js'
Submodule 'lib/mdsjs' (https://github.com/JosuaKrause/mdsjs.git) registered for path 'lib/mdsjs'
Submodule 'lib/quick_server' (https://github.com/JosuaKrause/quick_server.git) registered for path 'lib/quick_server'
Cloning into '/Users/maggjin/patient-viz/lib/jk-js'...
Cloning into '/Users/maggjin/patient-viz/lib/mdsjs'...
Cloning into '/Users/maggjin/patient-viz/lib/quick_server'...
Submodule path 'lib/jk-js': checked out '89002cebe45a63f68c27bea93a0cfc551b0a4033'
Submodule path 'lib/mdsjs': checked out 'c9a311bd885b2d0da456e717789e08fe07c711bf'
Submodule path 'lib/quick_server': checked out '452be0c902fa7415dafb6e57aee46c84f4ea5ffa'
downloading https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.1.1.tar.gz?md5=901ecbf302f5de9fdb31d843290b7217
######################################################################## 100.0%
New python executable in .venv/bin/python
Installing setuptools, pip...
  Complete output from command /Users/maggjin/patient-viz/.venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/maggjin/patient-viz/virtualenv-12.1.1/virtualenv_support/pip-6.1.1-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/Users/maggjin/patient-viz/virtualenv-12.1.1/virtualenv_support/pip-6.1.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 14, in <module>
  File "/Users/maggjin/anaconda/lib/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/Users/maggjin/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/maggjin/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/maggjin/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Users/maggjin/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "virtualenv-12.1.1/virtualenv.py", line 2352, in <module>
    main()
  File "virtualenv-12.1.1/virtualenv.py", line 825, in main
    symlink=options.symlink)
  File "virtualenv-12.1.1/virtualenv.py", line 993, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "virtualenv-12.1.1/virtualenv.py", line 961, in install_wheel
    'PIP_NO_INDEX': '1'
  File "virtualenv-12.1.1/virtualenv.py", line 903, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/maggjin/patient-viz/.venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
setup failed!
JosuaKrause commented 7 years ago

thanks for the report :) looks like a bad interaction between virtualenv and anaconda. I was able to reproduce after installing anaconda. I will look into it.

this bug might be related

JosuaKrause commented 7 years ago

alternatively you can call setup.sh without using pip (that is: ./setup.sh --ccs --omop --psql) and make sure all required packages are installed via anaconda (before doing so clean the directory using ./setup.sh --clean and make sure the folder .venv doesn't exist). It appears the anaconda guys argue that with their python you don't need virtualenv so they likely won't fix the issue.

SeeMJ commented 7 years ago

Thanks, Josua! I ran a complete fresh install as you recommended. But I still got the same error:

------------------ Console output:

186590cd8e57:patient-viz maggjin$ ./setup.sh --ccs --omop --psql

downloading https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.1.1.tar.gz?md5=901ecbf302f5de9fdb31d843290b7217

######################################################################## 100.0%

New python executable in .venv/bin/python

Installing setuptools, pip...

Complete output from command /Users/maggjin/Docum...viz/.venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:

Traceback (most recent call last):

File "", line 1, in

File "/Users/maggjin/Documents/patient-viz/virtualenv-12.1.1/virtualenv_support/pip-6.1.1-py2.py3-none-any.whl/pip/init.py", line 13, in

File "/Users/maggjin/Documents/patient-viz/virtualenv-12.1.1/virtualenv_support/pip-6.1.1-py2.py3-none-any.whl/pip/utils/init.py", line 14, in

File "/Users/maggjin/anaconda/lib/python2.7/zipfile.py", line 6, in

import io File "/Users/maggjin/anaconda/lib/python2.7/io.py", line 51, in import _io ImportError: dlopen(/Users/maggjin/Documents/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder Referenced from: /Users/maggjin/Documents/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so Expected in: flat namespace in /Users/maggjin/Documents/patient-viz/.venv/lib/python2.7/lib-dynload/_io.so ---------------------------------------- ...Installing setuptools, pip...done. Traceback (most recent call last): File "virtualenv-12.1.1/virtualenv.py", line 2352, in main() File "virtualenv-12.1.1/virtualenv.py", line 825, in main symlink=options.symlink) File "virtualenv-12.1.1/virtualenv.py", line 993, in create_environment install_wheel(to_install, py_executable, search_dirs) File "virtualenv-12.1.1/virtualenv.py", line 961, in install_wheel 'PIP_NO_INDEX': '1' File "virtualenv-12.1.1/virtualenv.py", line 903, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /Users/maggjin/Docum...viz/.venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1 setup failed! Maggie On Thu, May 18, 2017 at 11:39 AM, Josua Krause wrote: > alternatively you can call setup.sh without using pip (that is: ./setup.sh > --ccs --omop --psql) and make sure all required packages > are > installed via anaconda (before doing so clean the directory using ./setup.sh > --clean and make sure the folder .venv doesn't exist). It appears the > anaconda guys argue that with their python you don't need virtualenv so > they likely won't fix the issue. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
JosuaKrause commented 7 years ago

Oh my bad -- I forgot that --psql needs pip as well. Please make sure to have psycopg2 installed if you want database access (that is the case with --omop) and then run the command on a clean directory without --psql: ./setup.sh --ccs --omop

SeeMJ commented 7 years ago

Yes, I was able to install the project without complains. But when I tried to run the example: ./start.sh -p json/AEF023C2029F05BC.json --start there is no patient image loaded in the event panel, with error "Failed loading file json/AEF023C2029F05BC.json". Is it because I don't have patient's data? Are there any sample patient's data provided?

Thanks!

On Fri, May 19, 2017 at 10:36 AM, Josua Krause notifications@github.com wrote:

Oh my bad -- I forgot that --psql needs pip as well. Please make sure to have psycopg2 installed if you want database access (that is the case with --omop) and then run the command on a clean directory without --psql: ./setup.sh --ccs --omop

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nyuvis/patient-viz/issues/59#issuecomment-302765350, or mute the thread https://github.com/notifications/unsubscribe-auth/AHvi_N3fX0lZ9o3WgY2TVugxmflg8Hryks5r7dMdgaJpZM4NdQWX .

JosuaKrause commented 7 years ago

yes, you have to download and process the example data. you can follow instructions here. keep in mind, that since you don't use pip you have to write the full command and cannot rely on the short-cut --default:

./setup.sh --icd9 --ccs --ndc --pnt --cms --do-convert --burst

This may take a while. Also, you don't have to clean up before executing the command. All those things will be created in addition to what you have already.