SeismicData / pyasdf

Python Interface to ASDF based on ObsPy
http://seismicdata.github.io/pyasdf/
BSD 3-Clause "New" or "Revised" License
53 stars 30 forks source link

setup broken between 0.5.1 and 0.6.1 #60

Closed viktor76525 closed 4 years ago

viktor76525 commented 4 years ago

Can't install pyasdf into home directory.

% pip install -v .
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec                                                                                                                                              
Exception information:                                                                                          
Traceback (most recent call last):                                                                                                                                                                                               
  File "/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)                                                                                                                                                                                             
  File "/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 289, in run
    raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec") 
pip._internal.exceptions.CommandError: (Gentoo) Please run pip with the --user option to avoid breaking python-exec

% pip install -v . --user
Created temporary directory: /tmp/pip-ephem-wheel-cache-4gbfsomu
Created temporary directory: /tmp/pip-req-tracker-4joucdkx                                                                                                                                                                       Created requirements tracker '/tmp/pip-req-tracker-4joucdkx'                                                                                                                                                                     
Created temporary directory: /tmp/pip-install-qxlbbpdr                                                                                                                                                                           
Processing pyasdf
  Created temporary directory: /tmp/pip-req-build-esqgclk9
  Added file:///.../pyasdf to build tracker '/tmp/pip-req-tracker-4joucdkx'
  Created temporary directory: /tmp/pip-build-env-_bf99xeq
  Running command /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_bf99xeq/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: 
-i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel 
  ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
  Exception information:
  Traceback (most recent call last):
    File "/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
      status = self.run(options, args)
    File "/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 289, in run
      raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec")
  pip._internal.exceptions.CommandError: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
  Installing build dependencies ... error
Cleaning up...
  Removing source in /tmp/pip-req-build-esqgclk9
Removed file:///.../pyasdf from build tracker '/tmp/pip-req-tracker-4joucdkx'
Removed build tracker '/tmp/pip-req-tracker-4joucdkx'
ERROR: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_bf99xeq/overlay --no-warn-script-location -v --no-binary
 :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 385, in run
    resolver.resolve(requirement_set)
  File "/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 313, in _get_abstract_dist_for
    req, self.session, self.finder, self.require_hashes
  File "/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 224, in prepare_linked_requirement
    req, self.req_tracker, finder, self.build_isolation,
    "Installing build dependencies"
  File "/usr/lib/python3.7/site-packages/pip/_internal/build_env.py", line 201, in install_requirements
    call_subprocess(args, spinner=spinner)
  File "/usr/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_bf99xeq/overlay --n
o-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

Latest version that is listed as working with Python 3.6 (0.5.1) works but the latest version which requires Python 3.7 doesn't.

machine 1 (ok) setuptools 44.0 python 3.6 pyasdf 0.5.1

machine 2 (not ok) setuptools 44.1 python 3.7 pyasdf 0.6.1 or git

viktor76525 commented 4 years ago

I just tried to install 0.6.0 with pip and it work so must be a change in 0.6.1

krischer commented 4 years ago

I don't see what could have caused that going from 0.6.0 to 0.6.1 - the only change in the setup.py is that there is actually one less dependency: https://github.com/SeismicData/pyasdf/compare/0.6.0...0.6.1

The error log seems to indicate an issue with updating setuptools. It tries to update setuptools without the --user flag and that fails. But the log is kind of hard to parse so I'm not sure that is the case.

In general I'd recommend to also not use the --user flag but rather create a virtual environment (supported by the Python stdlib since Python 3.3 or so) or install conda and create a separate environment.

Concluding I think its an issue with your system and not pyasdf. Please let me know if I am mistaken.

viktor76525 commented 4 years ago

I apologize. I didn't notice that long command was basically trying to install setuptools and wheel. It seems 0.6.0 has a whl file while 0.6.1 does not and my pip/setuptools configuration is broken.

krischer commented 4 years ago

No worries :-) Glad you figured it out!