Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to pip install on mac OS #1

Open
samredway opened this issue Nov 7, 2018 · 1 comment
Open

Unable to pip install on mac OS #1

samredway opened this issue Nov 7, 2018 · 1 comment

Comments

@samredway
Copy link

samredway commented Nov 7, 2018

I am unable to pip install lib on mac os. For example:

pip3 install -vv --process-dependency-links --upgrade git+https://github.com/bloomsburyai/cape-responder

fails with error:

      16 errors generated.
      error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/Cape/test/venv/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/private -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/private -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/private -Ibuild/src.macosx-10.13-x86_64-3.7/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.macosx-10.13-x86_64-3.7/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.macosx-10.13-x86_64-3.7/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
      Running setup.py install for numpy: finished with status 'error'
  Cleaning up...
    Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-30iv8isw/numpy
  Cleaned build tracker '/private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-req-tracker-uwd_7y3i'
  Command "/Cape/test/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-30iv8isw/numpy/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/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-record-7hfnwisp/install-record.txt --single-version-externally-managed --prefix /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-build-env-1nml2vn8 --compile --install-headers /Cape/test/venv/include/site/python3.7/numpy" failed with error code 1 in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-30iv8isw/numpy/
  Exception information:
  Traceback (most recent call last):
    File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
      status = self.run(options, args)
    File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 366, in run
      use_user_site=options.use_user_site,
    File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
      **kwargs
    File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 791, in install
      spinner=spinner,
    File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
      % (command_desc, proc.returncode, cwd))
  pip._internal.exceptions.InstallationError: Command "/Cape/test/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-30iv8isw/numpy/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/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-record-7hfnwisp/install-record.txt --single-version-externally-managed --prefix /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-build-env-1nml2vn8 --compile --install-headers /Cape/test/venv/include/site/python3.7/numpy" failed with error code 1 in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-30iv8isw/numpy/
error
Cleaning up...
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-req-build-cs_5sl7_
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cape-machine-reader
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cape-document-manager
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cape-document-qa
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/tornado
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/msgpack-python
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/psutil
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/toolz
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/pyinterval
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/scout
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cytoolz
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cape-splitter
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/cape-api-helpers
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/h5py
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/nltk
  Removing source in /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-install-a8czkbl1/pandas
Removed pandas==0.22 from https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz#sha256=44a94091dd71f05922eec661638ec1a35f26d573c119aa2fad964f10a2880e6c (from cape_document_qa==cbaa69f839bf4bb67a1c3e28cd6ab8cc6d30711d->cape-responder===499e81b40b56e47fb43f98ff2a98d2bd16129cbb) from build tracker '/private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-req-tracker-uwd_7y3i'
Removed build tracker '/private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-req-tracker-uwd_7y3i'
Command "/Cape/test/venv/bin/python3 -m pip install --ignore-installed --no-user --prefix /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-build-env-1nml2vn8 --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple --process-dependency-links -- wheel setuptools Cython "numpy==1.9.3; python_version=='3.5'" "numpy==1.12.1; python_version=='3.6'" "numpy==1.13.1; python_version>='3.7'"" failed with error code 1 in None
Exception information:
Traceback (most recent call last):
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 318, in run
    resolver.resolve(requirement_set)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
    self.require_hashes
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 109, in prep_for_dist
    "Installing build dependencies"
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/build_env.py", line 122, in install_requirements
    call_subprocess(args, show_stdout=False, spinner=spinner)
  File "/Cape/test/venv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/Cape/test/venv/bin/python3 -m pip install --ignore-installed --no-user --prefix /private/var/folders/v6/2mjxf4d56fb1xvfb9h2gg5sc0000gn/T/pip-build-env-1nml2vn8 --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple --process-dependency-links -- wheel setuptools Cython "numpy==1.9.3; python_version=='3.5'" "numpy==1.12.1; python_version=='3.6'" "numpy==1.13.1; python_version>='3.7'"" failed with error code 1 in None

It is worth noting that this approach works fine in the following Docker container:

FROM ubuntu:18.04

RUN apt-get -y update && \
    apt-get install -y python-dev python3-dev python3-pip git zlib1g-dev\
                       apt-transport-https ca-certificates wget build-essential\
                       libcurl4-openssl-dev g++ htop nano parallel curl locales\
                       daemontools unzip python3-distutils && \
    apt-get clean

RUN pip3 install --upgrade pip setuptools dumb-init ipython

# Ensure that we always use UTF-8 and with US English locale
RUN locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV PYTHONIOENCODING utf-8

#Add non-root user to run app
RUN useradd -G users -m runner
WORKDIR /mnt/

#Argument to rebuild from this point after an update
ARG COMMIT_SHA1=1
RUN pip3 install -vv --process-dependency-links --upgrade git+https://github.com/bloomsburyai/cape-responder

So my current work around is to do all work in Docker - but it would definitley be easier workflow to be able to install these libs locally.

@samredway
Copy link
Author

samredway commented Nov 13, 2018

Seems like this is a versioning issue. Project requires python 3.6 and pip 9 ( I built it with python 3.6.0 and pip 9.0.1 specifically ). I was using python 3.7 and pip 10 which does not support the versions that are pinned in some of the requirements. This goes for other repos as well such as. May be worth getting into the readme somewhere!

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

No branches or pull requests

1 participant