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

Allow pip install without NumPy or Cython #171

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

jjhelmus
Copy link

Allow fastparquet to be installed when NumPy and Cython are not already
installed. pip attempts to run python setup.py egg_info to detemine the
install requirements. Allow this command and other non-build related commands
to be run without importing numpy or cython.

closes #170

Allow fastparquet to be installed when NumPy and Cython are not already
installed. pip attempts to run `python setup.py egg_info` to detemine the
install requirements.  Allow this command and other non-build related commands
to be run without importing numpy or cython.

closes dask#170
@martindurant
Copy link
Member

So what happens when you pip-install, but numpy or cython is not around?

@jjhelmus
Copy link
Author

jjhelmus commented Jun 19, 2017

With this change, pip will try to download and install the requirements in the setup.py file including NumPy and Cython if they are not already installed. This will typically trigger builds from source which can take a long time and may fail, but it is the expected behavior.

For example:

$ conda create -y -n fp_test python=3.6 pip setuptools
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/jhelmus/anaconda3/envs/fp_test:

The following NEW packages will be INSTALLED:

    openssl:    1.0.2l-0      defaults
    pip:        9.0.1-py36_1  defaults
    python:     3.6.1-2       defaults
    readline:   6.2-2         defaults
    setuptools: 27.2.0-py36_0 defaults
    sqlite:     3.13.0-0      defaults
    tk:         8.5.18-0      defaults
    wheel:      0.29.0-py36_0 defaults
    xz:         5.2.2-1       defaults
    zlib:       1.2.8-3       defaults

#
# To activate this environment, use:
# > source activate fp_test
#
# To deactivate this environment, use:
# > source deactivate fp_test
#

$ source activate fp_test
(fp_test) $ pip install .
Processing /home/jhelmus/workspace/fastparquet
Collecting pandas (from fastparquet==0.1.0)
  Using cached pandas-0.20.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting numba>=0.28 (from fastparquet==0.1.0)
  Using cached numba-0.33.0.tar.gz
...
Installing collected packages: six, python-dateutil, pytz, numpy, pandas, llvmlite, numba, ply, thriftpy, py, pytest, cython, fastparquet
  Running setup.py install for numba ... done
  Running setup.py install for fastparquet ... done
Successfully installed cython-0.25.2 fastparquet-0.1.0 llvmlite-0.18.0 numba-0.33.0 numpy-1.13.0 pandas-0.20.2 ply-3.10 py-1.4.34 pytest-3.1.2 python-dateutil-2.6.0 pytz-2017.2 six-1.10.0 thriftpy-0.3.9

@martindurant
Copy link
Member

OK, this seems to be a reasonable solution - if perhaps I don't expect it to be used very often. I hope not to see follow-on issues from compilation error of numpy itself!

@martindurant martindurant merged commit 50e7c50 into dask:master Jun 20, 2017
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

Successfully merging this pull request may close these issues.

pip installing fails if numpy is not already installed
2 participants