Offline installation using pip no longer works #2097
Description
Description of the problem
Originally posted by @maxrjones in #1848 (comment)
A downside here is that make install no longer works without internet access, even if setuptools>=64 is installed in the environment. I'll do some more searching for a workaround but if anyone knows a solution that would be helpful.
Originally posted by @weiji14 in #1848 (comment)
I tried disconnecting and used pip install --no-deps --no-build-isolation --editable=. which seems to work offline (presumably it manages to pick up a pre-downloaded setuptools>=64). However, it results in a editable version named pygmt-0.0.0. Maybe the offline feature can be raised upstream to PyPA?
Originally posted by @seisman in #1848 (comment)
A downside here is that
make installno longer works without internet access, even if setuptools>=64 is installed in the environment.
It's unrelated to this PR. Offline make install worked for pygmt<=0.2.0 and started to fail since v0.3.0, in which we switched from versioneer to setuptools_scm (https://www.pygmt.org/dev/changes.html#id47). So it's likely a problem for setuptools_scm.
I tried disconnecting and used
pip install --no-deps --no-build-isolation --editable=.which seems to work offline (presumably it manages to pick up a pre-downloadedsetuptools>=64). However, it results in a editable version namedpygmt-0.0.0.
This command gives the correct version for pygmt <= 0.6.0 but results in pygmt-0.0.0 for pygmt v0.7.0. Not sure if it's caused by changes in #1945.
Activity
maxrjones commentedon Aug 30, 2022
This comment is confusing to me because I tried
make installoffline on the commit preceding 06fca61 and it worked fine.seisman commentedon Aug 30, 2022
Here are a series of commands I run without internet access:
Running
pip cache list | grep setuptoolsgives me nothing. It seems the failures I'm getting is because I don't have setuptools cached.seisman commentedon Aug 31, 2022
It seems there are two different issues here.
@maxrjones Are you talking about the first one?
maxrjones commentedon Aug 31, 2022
Yes, I was talking about the first one. #2097 (comment) makes sense as an explanation, as I had setuptools installed in my environment.
seisman commentedon Jun 24, 2023
I'm inclined to close the issue to reduce the number of our opened issues, mainly because:
setuptools_scmdoesn't allow offline installation and there is very little we can do.Closing the issue but feel free to reopen it if necessary.