ayaanhossain / nrpcalc

Non-Repetitive Parts Calculator - Automated design and discovery of non-repetitive genetic parts for engineering stable genetic systems
MIT License
7 stars 4 forks source link

Trouble installing plyvel package #1

Closed eyesmo closed 4 years ago

eyesmo commented 4 years ago

On MacOS Mojave 10.14.6,

Went to finish installing with pip install --upgrade nrpcalc --no-cache-dir Most packages installed correctly, but plyvel did not. Instead, got the following:

Building wheel for plyvel (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-wheel-aMLKEW
       cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/
  Complete output (15 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-x86_64-2.7
  creating build/lib.macosx-10.6-x86_64-2.7/plyvel
  copying plyvel/_version.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
  copying plyvel/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
  running build_ext
  building 'plyvel._plyvel' extension
  creating build/temp.macosx-10.6-x86_64-2.7
  creating build/temp.macosx-10.6-x86_64-2.7/plyvel
  gcc -fno-strict-aliasing -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.macosx-10.6-x86_64-2.7/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
  clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for plyvel
  Running setup.py clean for plyvel

Followed later by

Running setup.py install for plyvel ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-hpoOjW/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python2.7/plyvel
         cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/
    Complete output (15 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-x86_64-2.7
    creating build/lib.macosx-10.6-x86_64-2.7/plyvel
    copying plyvel/_version.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
    copying plyvel/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
    running build_ext
    building 'plyvel._plyvel' extension
    creating build/temp.macosx-10.6-x86_64-2.7
    creating build/temp.macosx-10.6-x86_64-2.7/plyvel
    gcc -fno-strict-aliasing -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.macosx-10.6-x86_64-2.7/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
    clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FgyaNg/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-hpoOjW/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python2.7/plyvel Check the logs for full command output.

This disrupts the installation process, as when I try to import nrpcalc, I get this:

(nrpenv) [isaac ~]$ python
Python 2.7.15 | packaged by conda-forge | (default, Mar  5 2020, 14:58:04) 
[GCC Clang 9.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nrpcalc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named nrpcalc
ayaanhossain commented 4 years ago

Hi Isaac, plyvel uses LevelDB which is perhaps not installed with plyvel on MacOS. Luckily it can be fixed with homebrew. On shell plz try: brew install leveldb. Then try installing again? Let me know if this fixes the issue.

In case you do not have homebrew installed, follow this link: https://brewinstall.org/Install-leveldb-on-Mac-with-Brew/

ayaanhossain commented 4 years ago

@eyesmo is the issue now resolved via homebrew? This issue is now reflected in the new readme.

eyesmo commented 4 years ago

Hi Ayaan, thanks for the suggestion. Unfortunately the issue is not fixed. I installed leveldb and confirmed it:

(nrpenv) [isaac ~]$ brew install leveldb
leveldb 1.22 is already installed and up-to-date
To reinstall 1.22, run `brew reinstall leveldb`

Then I ran pip install --upgrade nrpcalc --no-cache-dir

Here's the full output:

(nrpenv) [isaac ~]$ pip install --upgrade nrpcalc --no-cache-dir
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting nrpcalc
  Downloading nrpcalc-1.1.15.tar.gz (37 kB)
Requirement already satisfied, skipping upgrade: numpy==1.16.6 in ./anaconda/envs/nrpenv/lib/python2.7/site-packages (from nrpcalc) (1.16.6)
Requirement already satisfied, skipping upgrade: biopython==1.76 in ./anaconda/envs/nrpenv/lib/python2.7/site-packages (from nrpcalc) (1.76)
Collecting plyvel==1.2.0
  Downloading plyvel-1.2.0.tar.gz (145 kB)
     |████████████████████████████████| 145 kB 6.1 MB/s 
Collecting scipy==1.2.3
  Downloading scipy-1.2.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (27.4 MB)
     |████████████████████████████████| 27.4 MB 41.3 MB/s 
Collecting networkx==2.2
  Downloading networkx-2.2.zip (1.7 MB)
     |████████████████████████████████| 1.7 MB 24.5 MB/s 
Collecting jupyter==1.0.0
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting scikit-learn==0.20.4
  Downloading scikit_learn-0.20.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.3 MB)
     |████████████████████████████████| 8.3 MB 14.3 MB/s 
Collecting seaborn==0.9.1
  Downloading seaborn-0.9.1-py2.py3-none-any.whl (216 kB)
     |████████████████████████████████| 216 kB 3.2 MB/s 
Collecting statsmodels==0.11.0
  Downloading statsmodels-0.11.0.tar.gz (15.4 MB)
     |████████████████████████████████| 15.4 MB 8.0 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting decorator>=4.3.0
  Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting jupyter-console
  Downloading jupyter_console-5.2.0-py2.py3-none-any.whl (20 kB)
Collecting notebook
  Downloading notebook-5.7.10-py2.py3-none-any.whl (9.6 MB)
     |████████████████████████████████| 9.6 MB 21.7 MB/s 
Collecting nbconvert
  Downloading nbconvert-5.6.1-py2.py3-none-any.whl (455 kB)
     |████████████████████████████████| 455 kB 20.1 MB/s 
Collecting ipywidgets
  Downloading ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
     |████████████████████████████████| 121 kB 26.5 MB/s 
Collecting qtconsole
  Downloading qtconsole-4.7.5-py2.py3-none-any.whl (118 kB)
     |████████████████████████████████| 118 kB 22.4 MB/s 
Collecting ipykernel
  Downloading ipykernel-4.10.1-py2-none-any.whl (109 kB)
     |████████████████████████████████| 109 kB 25.8 MB/s 
Collecting matplotlib>=1.5.3
  Downloading matplotlib-2.2.5-cp27-cp27m-macosx_10_9_x86_64.whl (12.9 MB)
     |████████████████████████████████| 12.9 MB 14.5 MB/s 
Collecting pandas>=0.17.1
  Downloading pandas-0.24.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.7 MB)
     |████████████████████████████████| 16.7 MB 11.9 MB/s 
Collecting patsy>=0.5
  Downloading patsy-0.5.1-py2.py3-none-any.whl (231 kB)
     |████████████████████████████████| 231 kB 17.2 MB/s 
Collecting jupyter-client
  Downloading jupyter_client-5.3.5-py2.py3-none-any.whl (92 kB)
     |████████████████████████████████| 92 kB 10.6 MB/s 
Collecting prompt-toolkit<2.0.0,>=1.0.0
  Downloading prompt_toolkit-1.0.18-py2-none-any.whl (245 kB)
     |████████████████████████████████| 245 kB 22.8 MB/s 
Collecting ipython
  Downloading ipython-5.10.0-py2-none-any.whl (760 kB)
     |████████████████████████████████| 760 kB 25.8 MB/s 
Collecting pygments
  Downloading Pygments-2.5.2-py2.py3-none-any.whl (896 kB)
     |████████████████████████████████| 896 kB 23.7 MB/s 
Collecting ipaddress; python_version == "2.7"
  Downloading ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting nbformat
  Downloading nbformat-4.4.0-py2.py3-none-any.whl (155 kB)
     |████████████████████████████████| 155 kB 26.0 MB/s 
Collecting jinja2
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 19.6 MB/s 
Collecting terminado>=0.8.1
  Downloading terminado-0.8.3-py2.py3-none-any.whl (33 kB)
Collecting pyzmq>=17
  Downloading pyzmq-19.0.1-cp27-cp27m-macosx_10_9_intel.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 800 kB/s 
Collecting traitlets>=4.2.1
  Downloading traitlets-4.3.3-py2.py3-none-any.whl (75 kB)
     |████████████████████████████████| 75 kB 19.5 MB/s 
Collecting prometheus-client
  Downloading prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 13.3 MB/s 
Collecting Send2Trash
  Downloading Send2Trash-1.5.0.tar.gz (10 kB)
Collecting ipython-genutils
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting tornado<7,>=4.1
  Downloading tornado-5.1.1.tar.gz (516 kB)
     |████████████████████████████████| 516 kB 19.3 MB/s 
Collecting jupyter-core>=4.4.0
  Downloading jupyter_core-4.6.3-py2.py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 19.3 MB/s 
Collecting testpath
  Downloading testpath-0.4.4-py2.py3-none-any.whl (163 kB)
     |████████████████████████████████| 163 kB 23.8 MB/s 
Collecting entrypoints>=0.2.2
  Downloading entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting pandocfilters>=1.4.1
  Downloading pandocfilters-1.4.2.tar.gz (14 kB)
Collecting bleach
  Downloading bleach-3.1.5-py2.py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 24.5 MB/s 
Collecting defusedxml
  Downloading defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting mistune<2,>=0.8.1
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting widgetsnbextension~=3.5.0
  Downloading widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2 MB)
     |████████████████████████████████| 2.2 MB 26.1 MB/s 
Collecting qtpy
  Downloading QtPy-1.9.0-py2.py3-none-any.whl (54 kB)
     |████████████████████████████████| 54 kB 17.9 MB/s 
Collecting backports.functools-lru-cache
  Downloading backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl (5.7 kB)
Collecting six>=1.10
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pytz
  Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
     |████████████████████████████████| 510 kB 29.3 MB/s 
Collecting python-dateutil>=2.1
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 27.2 MB/s 
Collecting cycler>=0.10
  Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (115 kB)
     |████████████████████████████████| 115 kB 22.8 MB/s 
Collecting subprocess32
  Downloading subprocess32-3.5.4-cp27-cp27m-macosx_10_6_intel.whl (34 kB)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 15.9 MB/s 
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting pexpect; sys_platform != "win32"
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     |████████████████████████████████| 59 kB 18.6 MB/s 
Collecting appnope; sys_platform == "darwin"
  Downloading appnope-0.1.0-py2.py3-none-any.whl (4.0 kB)
Requirement already satisfied, skipping upgrade: setuptools>=18.5 in ./anaconda/envs/nrpenv/lib/python2.7/site-packages (from ipython->jupyter-console->jupyter==1.0.0->nrpcalc) (44.0.0.post20200102)
Collecting simplegeneric>0.8
  Downloading simplegeneric-0.8.1.zip (12 kB)
Collecting pathlib2; python_version == "2.7" or python_version == "3.3"
  Downloading pathlib2-2.3.5-py2.py3-none-any.whl (18 kB)
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting backports.shutil-get-terminal-size; python_version == "2.7"
  Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl (6.5 kB)
Collecting jsonschema!=2.5.0,>=2.4
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     |████████████████████████████████| 56 kB 22.1 MB/s 
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl (17 kB)
Collecting ptyprocess; os_name != "nt"
  Downloading ptyprocess-0.6.0-py2.py3-none-any.whl (39 kB)
Collecting enum34; python_version == "2.7"
  Downloading enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting futures
  Downloading futures-3.3.0-py2-none-any.whl (16 kB)
Collecting singledispatch
  Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl (12 kB)
Collecting backports_abc>=0.4
  Downloading backports_abc-0.5-py2.py3-none-any.whl (5.2 kB)
Collecting configparser>=3.5; python_version == "2.7"
  Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)
Collecting packaging
  Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting scandir; python_version < "3.5"
  Downloading scandir-1.10.0.tar.gz (33 kB)
Collecting attrs>=17.4.0
  Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting importlib-metadata; python_version < "3.8"
  Downloading importlib_metadata-1.7.0-py2.py3-none-any.whl (31 kB)
Collecting pyrsistent>=0.14.0
  Downloading pyrsistent-0.16.0.tar.gz (108 kB)
     |████████████████████████████████| 108 kB 20.2 MB/s 
Collecting functools32; python_version < "3"
  Downloading functools32-3.2.3-2.tar.gz (31 kB)
Collecting zipp>=0.5
  Downloading zipp-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting contextlib2; python_version < "3"
  Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Building wheels for collected packages: nrpcalc, plyvel, networkx, statsmodels, Send2Trash, tornado, pandocfilters, simplegeneric, scandir, pyrsistent, functools32
  Building wheel for nrpcalc (setup.py) ... done
  Created wheel for nrpcalc: filename=nrpcalc-1.1.15-py2-none-any.whl size=37262 sha256=11dd38a700eb6cfbf6b72f54ff1c293343b24ffcac2de00cff7466779548f4ff
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/16/52/92/86edebb9d16e4215f3169e37cdc453941c823171595517973a
  Building wheel for plyvel (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-wheel-r1mY6K
       cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/
  Complete output (15 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-x86_64-2.7
  creating build/lib.macosx-10.6-x86_64-2.7/plyvel
  copying plyvel/_version.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
  copying plyvel/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
  running build_ext
  building 'plyvel._plyvel' extension
  creating build/temp.macosx-10.6-x86_64-2.7
  creating build/temp.macosx-10.6-x86_64-2.7/plyvel
  gcc -fno-strict-aliasing -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.macosx-10.6-x86_64-2.7/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
  clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for plyvel
  Running setup.py clean for plyvel
  Building wheel for networkx (setup.py) ... done
  Created wheel for networkx: filename=networkx-2.2-py2.py3-none-any.whl size=1526903 sha256=d736aea4d87073351d3f49c1da1336598192c62edaa0093f47a0d8ebb76f1c07
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/df/80/48/106e63760ff0dcd3658613d93c1ecf64301b9261172f2c1acf
  Building wheel for statsmodels (PEP 517) ... done
  Created wheel for statsmodels: filename=statsmodels-0.11.0-cp27-cp27m-macosx_10_14_x86_64.whl size=8495253 sha256=5f5bcb377ef1f0be18581a28ba2cc79c7c0cb74b0cb34b566f806f899e1c42e3
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/d6/4b/04/4ec67d8a1e51035490e2a56ef2ad5b5dc3481084cdfeefa365
  Building wheel for Send2Trash (setup.py) ... done
  Created wheel for Send2Trash: filename=Send2Trash-1.5.0-py2-none-any.whl size=10734 sha256=dac9196401cd80ee0787293d0671c701739df1f23790148493daeea536e838a2
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/a2/d8/14/0457f16488d8cbc2cf18bccb5f1ceb59675787a80c649251bc
  Building wheel for tornado (setup.py) ... done
  Created wheel for tornado: filename=tornado-5.1.1-cp27-cp27m-macosx_10_6_x86_64.whl size=451426 sha256=988f561dcab518c21382d83baf2330c3a873cc0521bcabce08d86d78836d59e2
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/d8/83/af/e0dc6afbf3a2c51af8d6e3f9fbe790d0c581c2de05bc5d50f5
  Building wheel for pandocfilters (setup.py) ... done
  Created wheel for pandocfilters: filename=pandocfilters-1.4.2-py2-none-any.whl size=7855 sha256=492e147a23f044844050a27841246e025630b6c52a5fefd0831497c7f4037e51
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/49/82/c2/20339405e38b5650a69542cbbcb85082f6840c488ecd22d02e
  Building wheel for simplegeneric (setup.py) ... done
  Created wheel for simplegeneric: filename=simplegeneric-0.8.1-py2-none-any.whl size=5075 sha256=456b78776472984c015bc9e5c412e0838d3bf6a1796fb5890c62f8cd61f5c23a
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/1b/83/23/9d866729c0090bfc62d03a5bd43080fb07a5f4fad10a09399a
  Building wheel for scandir (setup.py) ... done
  Created wheel for scandir: filename=scandir-1.10.0-cp27-cp27m-macosx_10_6_x86_64.whl size=18630 sha256=d2cc944f38bacc04a19e93860a9437c0d9d5f705e394fbf3b84b59f8a16f99bf
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/58/2c/26/52406f7d1f19bcc47a6fbd1037a5f293492f5cf1d58c539edb
  Building wheel for pyrsistent (setup.py) ... done
  Created wheel for pyrsistent: filename=pyrsistent-0.16.0-cp27-cp27m-macosx_10_6_x86_64.whl size=69370 sha256=05dedaf4ada9ce04820726431ca437bffcee7330d2150eca1a6402c821340d8a
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/1f/d0/6d/4eb101c505cdc5e2be006684c0b93f3095a8ac5e0cf9abb35c
  Building wheel for functools32 (setup.py) ... done
  Created wheel for functools32: filename=functools32-3.2.3.post2-py2-none-any.whl size=14556 sha256=2fa755e6081d86861e031ba9c2344d6d88a47c2431f90c74613341ec284c4dda
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-oXx2gm/wheels/c2/ea/a3/25af52265fad6418a74df0b8d9ca8b89e0b3735dbd4d0d3794
Successfully built nrpcalc networkx statsmodels Send2Trash tornado pandocfilters simplegeneric scandir pyrsistent functools32
Failed to build plyvel
Installing collected packages: plyvel, scipy, decorator, networkx, enum34, ipython-genutils, six, traitlets, jupyter-core, python-dateutil, futures, singledispatch, backports-abc, tornado, pyzmq, jupyter-client, backports.functools-lru-cache, wcwidth, prompt-toolkit, ptyprocess, pexpect, appnope, pygments, simplegeneric, scandir, pathlib2, pickleshare, backports.shutil-get-terminal-size, ipython, ipykernel, jupyter-console, ipaddress, attrs, configparser, contextlib2, zipp, importlib-metadata, pyrsistent, functools32, jsonschema, nbformat, MarkupSafe, jinja2, terminado, prometheus-client, Send2Trash, testpath, entrypoints, pandocfilters, pyparsing, packaging, webencodings, bleach, defusedxml, mistune, nbconvert, notebook, widgetsnbextension, ipywidgets, qtpy, qtconsole, jupyter, scikit-learn, pytz, cycler, kiwisolver, subprocess32, matplotlib, pandas, seaborn, patsy, statsmodels, nrpcalc
    Running setup.py install for plyvel ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-qn4i7Q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python2.7/plyvel
         cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/
    Complete output (15 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-x86_64-2.7
    creating build/lib.macosx-10.6-x86_64-2.7/plyvel
    copying plyvel/_version.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
    copying plyvel/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/plyvel
    running build_ext
    building 'plyvel._plyvel' extension
    creating build/temp.macosx-10.6-x86_64-2.7
    creating build/temp.macosx-10.6-x86_64-2.7/plyvel
    gcc -fno-strict-aliasing -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.macosx-10.6-x86_64-2.7/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
    clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/isaac/anaconda/envs/nrpenv/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-FKeGWG/plyvel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-qn4i7Q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python2.7/plyvel Check the logs for full command output.
bash: __git_ps1: command not found

So as far as I can tell plyvel is still not installing correctly. Want me to try running the installation in verbose mode and give you the output?

ayaanhossain commented 4 years ago

This is perhaps due to issues related to gcc/clang configuration on your MacOS. I've tried brew install leveldb followed by pip install plyvel on two different MacOS devices today itself, and everything installed fine. However, nrpcalc is now ported over to Python3 and plyvel has been removed as a dependency, in favor to directly using leveldb. Please check the new installation instructions for nrpcalc 1.2.2, where this issue is now hopefully non-existent @eyesmo. Please let me know if the issue still persists, or if it's resolved?

eyesmo commented 4 years ago

Hi Ayaan,

Haven't been able to resolve the issue yet. I'm now following the python3 installation instructions. I set up a conda environment for nrpcalc and confirmed installation of viennaRNA:

(nrpenv) [isaac ~]$ python
Python 3.6.10 | packaged by conda-forge | (default, Apr 24 2020, 16:27:41) 
[GCC Clang 9.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import RNA
>>> quit()

Note above that my version of GCC Clang is 9.0.1 on Darwin, while the one shown in the installation instructions is GCC 7.0.3 on Linux.

When I tried pip install --upgrade nrpcalc --no-cache-dir

I got the following output, which failed again at leveldb:

(nrpenv) [isaac ~]$ pip install --upgrade nrpcalc --no-cache-dir
Collecting nrpcalc
  Downloading nrpcalc-1.2.2.tar.gz (39 kB)
Collecting numpy>=1.19.0
  Downloading numpy-1.19.0-cp36-cp36m-macosx_10_9_x86_64.whl (15.4 MB)
     |████████████████████████████████| 15.4 MB 5.2 MB/s 
Collecting biopython>=1.77
  Downloading biopython-1.77-cp36-cp36m-macosx_10_9_x86_64.whl (2.3 MB)
     |████████████████████████████████| 2.3 MB 24.4 MB/s 
Collecting leveldb>=0.201
  Downloading leveldb-0.201.tar.gz (236 kB)
     |████████████████████████████████| 236 kB 16.7 MB/s 
Collecting scipy>=1.5.1
  Downloading scipy-1.5.1-cp36-cp36m-macosx_10_9_x86_64.whl (28.8 MB)
     |████████████████████████████████| 28.8 MB 903 kB/s 
Collecting networkx>=2.4
  Downloading networkx-2.4-py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 20.6 MB/s 
Collecting jupyter>=1.0.0
  Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting scikit-learn>=0.23.1
  Downloading scikit_learn-0.23.1-cp36-cp36m-macosx_10_9_x86_64.whl (7.2 MB)
     |████████████████████████████████| 7.2 MB 10.4 MB/s 
Collecting seaborn>=0.10.1
  Downloading seaborn-0.10.1-py3-none-any.whl (215 kB)
     |████████████████████████████████| 215 kB 20.7 MB/s 
Collecting statsmodels>=0.11.0
  Downloading statsmodels-0.11.1-cp36-cp36m-macosx_10_13_x86_64.whl (8.4 MB)
     |████████████████████████████████| 8.4 MB 13.2 MB/s 
Collecting decorator>=4.3.0
  Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting ipywidgets
  Downloading ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
     |████████████████████████████████| 121 kB 19.2 MB/s 
Collecting notebook
  Downloading notebook-6.0.3-py3-none-any.whl (9.7 MB)
     |████████████████████████████████| 9.7 MB 21.3 MB/s 
Collecting jupyter-console
  Downloading jupyter_console-6.1.0-py2.py3-none-any.whl (21 kB)
Collecting ipykernel
  Downloading ipykernel-5.3.3-py3-none-any.whl (120 kB)
     |████████████████████████████████| 120 kB 19.0 MB/s 
Collecting qtconsole
  Downloading qtconsole-4.7.5-py2.py3-none-any.whl (118 kB)
     |████████████████████████████████| 118 kB 20.9 MB/s 
Collecting nbconvert
  Downloading nbconvert-5.6.1-py2.py3-none-any.whl (455 kB)
     |████████████████████████████████| 455 kB 6.9 MB/s 
Collecting threadpoolctl>=2.0.0
  Downloading threadpoolctl-2.1.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
  Downloading joblib-0.16.0-py3-none-any.whl (300 kB)
     |████████████████████████████████| 300 kB 17.0 MB/s 
Collecting matplotlib>=2.1.2
  Downloading matplotlib-3.3.0-1-cp36-cp36m-macosx_10_9_x86_64.whl (11.4 MB)
     |████████████████████████████████| 11.4 MB 14.4 MB/s 
Collecting pandas>=0.22.0
  Downloading pandas-1.0.5-cp36-cp36m-macosx_10_9_x86_64.whl (10.2 MB)
     |████████████████████████████████| 10.2 MB 17.7 MB/s 
Collecting patsy>=0.5
  Downloading patsy-0.5.1-py2.py3-none-any.whl (231 kB)
     |████████████████████████████████| 231 kB 16.6 MB/s 
Collecting widgetsnbextension~=3.5.0
  Downloading widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2 MB)
     |████████████████████████████████| 2.2 MB 14.2 MB/s 
Collecting ipython>=4.0.0; python_version >= "3.3"
  Downloading ipython-7.16.1-py3-none-any.whl (785 kB)
     |████████████████████████████████| 785 kB 25.3 MB/s 
Collecting traitlets>=4.3.1
  Downloading traitlets-4.3.3-py2.py3-none-any.whl (75 kB)
     |████████████████████████████████| 75 kB 15.9 MB/s 
Collecting nbformat>=4.2.0
  Downloading nbformat-5.0.7-py3-none-any.whl (170 kB)
     |████████████████████████████████| 170 kB 31.6 MB/s 
Collecting tornado>=5.0
  Downloading tornado-6.0.4.tar.gz (496 kB)
     |████████████████████████████████| 496 kB 9.1 MB/s 
Collecting terminado>=0.8.1
  Downloading terminado-0.8.3-py2.py3-none-any.whl (33 kB)
Collecting jinja2
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 23.1 MB/s 
Collecting prometheus-client
  Downloading prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 17.5 MB/s 
Collecting Send2Trash
  Downloading Send2Trash-1.5.0-py3-none-any.whl (12 kB)
Collecting pyzmq>=17
  Downloading pyzmq-19.0.1-cp36-cp36m-macosx_10_9_intel.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 21.9 MB/s 
Collecting jupyter-core>=4.6.1
  Downloading jupyter_core-4.6.3-py2.py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 15.3 MB/s 
Collecting ipython-genutils
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting jupyter-client>=5.3.4
  Downloading jupyter_client-6.1.6-py3-none-any.whl (108 kB)
     |████████████████████████████████| 108 kB 25.3 MB/s 
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.5-py3-none-any.whl (351 kB)
     |████████████████████████████████| 351 kB 23.7 MB/s 
Collecting pygments
  Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
     |████████████████████████████████| 914 kB 24.8 MB/s 
Collecting appnope; platform_system == "Darwin"
  Downloading appnope-0.1.0-py2.py3-none-any.whl (4.0 kB)
Collecting qtpy
  Downloading QtPy-1.9.0-py2.py3-none-any.whl (54 kB)
     |████████████████████████████████| 54 kB 19.3 MB/s 
Collecting entrypoints>=0.2.2
  Downloading entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting defusedxml
  Downloading defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting bleach
  Downloading bleach-3.1.5-py2.py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 22.5 MB/s 
Collecting testpath
  Downloading testpath-0.4.4-py2.py3-none-any.whl (163 kB)
     |████████████████████████████████| 163 kB 21.9 MB/s 
Collecting pandocfilters>=1.4.1
  Downloading pandocfilters-1.4.2.tar.gz (14 kB)
Collecting mistune<2,>=0.8.1
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting pillow>=6.2.0
  Downloading Pillow-7.2.0-cp36-cp36m-macosx_10_10_x86_64.whl (2.2 MB)
     |████████████████████████████████| 2.2 MB 21.1 MB/s 
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 13.1 MB/s 
Collecting python-dateutil>=2.1
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 24.1 MB/s 
Collecting cycler>=0.10
  Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (60 kB)
     |████████████████████████████████| 60 kB 21.1 MB/s 
Collecting pytz>=2017.2
  Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
     |████████████████████████████████| 510 kB 15.4 MB/s 
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pexpect; sys_platform != "win32"
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     |████████████████████████████████| 59 kB 18.8 MB/s 
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting backcall
  Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting jedi>=0.10
  Downloading jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 15.8 MB/s 
Requirement already satisfied, skipping upgrade: setuptools>=18.5 in ./anaconda/envs/nrpenv/lib/python3.6/site-packages (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets->jupyter>=1.0.0->nrpcalc) (49.2.0.post20200712)
Collecting jsonschema!=2.5.0,>=2.4
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     |████████████████████████████████| 56 kB 14.6 MB/s 
Collecting ptyprocess; os_name != "nt"
  Downloading ptyprocess-0.6.0-py2.py3-none-any.whl (39 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl (18 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting packaging
  Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting parso<0.8.0,>=0.7.0
  Downloading parso-0.7.0-py2.py3-none-any.whl (100 kB)
     |████████████████████████████████| 100 kB 19.0 MB/s 
Collecting attrs>=17.4.0
  Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting pyrsistent>=0.14.0
  Downloading pyrsistent-0.16.0.tar.gz (108 kB)
     |████████████████████████████████| 108 kB 21.0 MB/s 
Collecting importlib-metadata; python_version < "3.8"
  Downloading importlib_metadata-1.7.0-py2.py3-none-any.whl (31 kB)
Collecting zipp>=0.5
  Downloading zipp-3.1.0-py3-none-any.whl (4.9 kB)
Building wheels for collected packages: nrpcalc, leveldb, tornado, pandocfilters, pyrsistent
  Building wheel for nrpcalc (setup.py) ... done
  Created wheel for nrpcalc: filename=nrpcalc-1.2.2-py3-none-any.whl size=39164 sha256=c7906dde07044f14e80d4902e09d1386e6274c01035522e9ebca848240eddb9b
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-ua9i_ty0/wheels/35/75/28/8d9867015307cee3241e16289939ab618e0ea01e6ea92c62be
  Building wheel for leveldb (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/isaac/anaconda/envs/nrpenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-wheel-nddtmlgx
       cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/
  Complete output (21 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'leveldb' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/snappy
  creating build/temp.macosx-10.7-x86_64-3.6/leveldb
  creating build/temp.macosx-10.7-x86_64-3.6/leveldb/db
  creating build/temp.macosx-10.7-x86_64-3.6/leveldb/table
  creating build/temp.macosx-10.7-x86_64-3.6/leveldb/util
  creating build/temp.macosx-10.7-x86_64-3.6/leveldb/port
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python3.6m -c ./snappy/snappy.cc -o build/temp.macosx-10.7-x86_64-3.6/./snappy/snappy.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX -Wno-error=unused-command-line-argument-hard-error-in-future
  warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
  warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  In file included from ./snappy/snappy.cc:29:
  ./snappy/snappy.h:43:10: fatal error: 'string' file not found
  #include <string>
           ^~~~~~~~
  2 warnings and 1 error generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for leveldb
  Running setup.py clean for leveldb
  Building wheel for tornado (setup.py) ... done
  Created wheel for tornado: filename=tornado-6.0.4-cp36-cp36m-macosx_10_7_x86_64.whl size=417378 sha256=a231cc5d63c26ab157b4803bce4cdfb95b90daf7ba6219b8a09153ba039ab60e
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-ua9i_ty0/wheels/37/a7/db/2d592e44029ef817f3ef63ea991db34191cebaef087a96f505
  Building wheel for pandocfilters (setup.py) ... done
  Created wheel for pandocfilters: filename=pandocfilters-1.4.2-py3-none-any.whl size=7856 sha256=e493c8c7a78c0d6c0cd68963c1091d98a2d2173d20afef96be4f997d3111579e
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-ua9i_ty0/wheels/46/c4/40/718c6fd14c2129ccaee10e0cf03ef6c4d01d98cad5dbbfda38
  Building wheel for pyrsistent (setup.py) ... done
  Created wheel for pyrsistent: filename=pyrsistent-0.16.0-cp36-cp36m-macosx_10_7_x86_64.whl size=69480 sha256=ac39dcd1cffd74cfdd09d69763962d233f9729cc7fa77a1b020bc01d5f05903c
  Stored in directory: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-ephem-wheel-cache-ua9i_ty0/wheels/d1/8a/1c/32ab9017418a2c64e4fbaf503c08648bed2f8eb311b869a464
Successfully built nrpcalc tornado pandocfilters pyrsistent
Failed to build leveldb
Installing collected packages: numpy, biopython, leveldb, scipy, decorator, networkx, six, ipython-genutils, traitlets, tornado, appnope, ptyprocess, pexpect, wcwidth, prompt-toolkit, pickleshare, backcall, parso, jedi, pygments, ipython, jupyter-core, pyzmq, python-dateutil, jupyter-client, ipykernel, terminado, MarkupSafe, jinja2, prometheus-client, attrs, pyrsistent, zipp, importlib-metadata, jsonschema, nbformat, Send2Trash, entrypoints, defusedxml, pyparsing, packaging, webencodings, bleach, testpath, pandocfilters, mistune, nbconvert, notebook, widgetsnbextension, ipywidgets, jupyter-console, qtpy, qtconsole, jupyter, threadpoolctl, joblib, scikit-learn, pillow, cycler, kiwisolver, matplotlib, pytz, pandas, seaborn, patsy, statsmodels, nrpcalc
    Running setup.py install for leveldb ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/isaac/anaconda/envs/nrpenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-5ycwpulr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python3.6m/leveldb
         cwd: /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/
    Complete output (21 lines):
    running install
    running build
    running build_ext
    building 'leveldb' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/snappy
    creating build/temp.macosx-10.7-x86_64-3.6/leveldb
    creating build/temp.macosx-10.7-x86_64-3.6/leveldb/db
    creating build/temp.macosx-10.7-x86_64-3.6/leveldb/table
    creating build/temp.macosx-10.7-x86_64-3.6/leveldb/util
    creating build/temp.macosx-10.7-x86_64-3.6/leveldb/port
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -I/Users/isaac/anaconda/envs/nrpenv/include -arch x86_64 -I/include -I/Users/isaac/anaconda/envs/nrpenv/include/python3.6m -c ./snappy/snappy.cc -o build/temp.macosx-10.7-x86_64-3.6/./snappy/snappy.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX -Wno-error=unused-command-line-argument-hard-error-in-future
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from ./snappy/snappy.cc:29:
    ./snappy/snappy.h:43:10: fatal error: 'string' file not found
    #include <string>
             ^~~~~~~~
    2 warnings and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/isaac/anaconda/envs/nrpenv/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"'; __file__='"'"'/private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-install-gxce6izx/leveldb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/hw/6j9xcdd57nd0_t2gmtsgzt8r0000gp/T/pip-record-5ycwpulr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/isaac/anaconda/envs/nrpenv/include/python3.6m/leveldb Check the logs for full command output.

This despite my checking and confirming that homebrew does still have leveldb installed:

(nrpenv) [isaac ~]$ brew install leveldb
...
Warning: leveldb 1.22 is already installed and up-to-date
To reinstall 1.22, run `brew reinstall leveldb`
hsalis commented 4 years ago

I recommend installing and using docker to overcome the dependency issues. I'll have Ayaan upload our lab docker file for your convenience. The base is Ubuntu Linux.

eyesmo commented 4 years ago

Thanks Howard. I have Docker installed but not much experience setting up containers. Will try with the docker file when Ayaan uploads it and report back here if I have any issues.

ayaanhossain commented 4 years ago

Yes, as @hsalis mentioned above, I'll build a docker image for nrpcalc and have it uploaded pretty soon. In the meantime, here's a couple of observations from the errors you're facing. The crux of the problem with your setup is

warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ./snappy/snappy.cc:29:
./snappy/snappy.h:43:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1

This tells me that stdlibc++ headers cannot be found on your PATH, and the setup instead recommends using libc++. Because the standard headers are not found, <string> and other standard library headers are missing, and you run into compilation issues.

A couple of things you can try to fix this.

Approach 1: Using libc++ This approach temporarily changes the CPPFLAGS pior to leveldb installation. On shell please try

$ export CPPFLAGS="-stdlib=libc++"

followed by installing leveldb inside the nrpenv environment with

$ pip install --upgrade leveldb --no-cache-dir

If leveldb installs fine, you can proceed with installing nrpcalc as usual.

Approach 2: (re)Installing xcode Sometimes this compilation issue is due to missing xcode on your MacOS. To install xcode, please do the following on your shell

$ xcode-select --install

Alternatively, you may download xcode from Mac App Store and try re/installing it from there. See links below for some discussion on errors similar to what you're facing. After this, try installing nrpcalc again.

Helpful Links: (1) A Stack Overflow discussion on an issue similar to yours. (2) A similar issue with eleveldb which is an Erlang wrapper on top of leveldb. (3) A Stack Exchange discussion on reinstalling xcode.

If you manage to install leveldb inside nrpenv successfully, could also try pip install --upgrade plyvel --no-cache-dir, and see if that works? Let me know how this goes Isaac (@eyesmo).

eyesmo commented 4 years ago

Temporarily changing CPPFLAGS to use libc++ worked--I was able to install leveldb and nrpcalc following your recommendations. Thanks for your help, Ayaan!

ayaanhossain commented 4 years ago

Awesome Isaac! This makes me so happy! I'll release a docker image soon nonetheless. Also, a jupyter notebook showing the algorithm in action is in the works. Stay tuned!