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

python setup.py install doesn't work from github tarballs #95

Open
sbailey opened this issue Jul 27, 2018 · 3 comments
Open

python setup.py install doesn't work from github tarballs #95

sbailey opened this issue Jul 27, 2018 · 3 comments

Comments

@sbailey
Copy link
Contributor

sbailey commented Jul 27, 2018

python setup.py install doesn't work from github tarballs, giving the following message:

The requested path 'astropy_helpers' for importing astropy_helpers does not exist, or does not contain a copy of the astropy_helpers package.
Downloading 'astropy-helpers'; run setup.py with the --offline option to force offline installation.
No source found for the 'astropy_helpers' package; astropy_helpers must be available and importable as a prerequisite to building or installing this package.

If the problem persists consider installing astropy_helpers manually using pip
(`pip install astropy_helpers`) or by manually downloading the source archive,
extracting it, and installing by running `python setup.py install` from the
root of the extracted source code.

When running from a git clone, it is able to automatically download astropy_helpers and install specsim without doing a global installation of astropy_helpers. It would be helpful if that would also work for the github tarballs.

In the meantime we've been doing "by-hand" installs from git clones at NERSC.

@dkirkby
Copy link
Member

dkirkby commented Jul 27, 2018

I cannot reproduce this in a clean conda env, using:

curl -O https://codeload.github.com/desihub/specsim/tar.gz/v0.12
tar -ztf v0.12
cd specsim-0.12
conda create -n specsim_test
conda activate specsim_test
python setup.py install

The install command runs normally with output that starts with:

The requested path 'astropy_helpers' for importing astropy_helpers does not exist, or does not contain a copy of the astropy_helpers package.
Downloading 'astropy-helpers'; run setup.py with the --offline option to force offline installation.
Freezing version number to ./specsim/version.py
running install
...

I'm not sure why you are getting this error, but it seems to be related to your (nersc?) environment:

No source found for the 'astropy_helpers' package; astropy_helpers must be available and importable as a prerequisite to building or installing this package.

Note that if I replace python setup.py install with pip install ., the install appears to succeed without ever downloading astropy_helpers.

@weaverba137
Copy link
Member

Another thing to keep in mind is that desiInstall interprets anything written to stderr as an error message, even if the message is actually just a warning or informational.

@sbailey
Copy link
Contributor Author

sbailey commented Jul 27, 2018

I have the same problem on my laptop, including the version you lists above with the conda environment. i.e. it isn't specific to NERSC or desiInstall. pip install . also fails for me.

@dkirkby do you possibly have astropy_helpers pre-installed in your path somewhere else such that the install fails to grab it but it can proceed anyway?

Note that there is a typo in your commands tar -ztf v0.12 -> tar -zxf v0.12. Is it possible that you didn't really run this in the extracted tarball that you just downloaded?

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

3 participants