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

setup.py install dependency issues #112

Open
Kappibw opened this issue Nov 11, 2022 · 0 comments
Open

setup.py install dependency issues #112

Kappibw opened this issue Nov 11, 2022 · 0 comments
Labels

Comments

@Kappibw
Copy link
Contributor

Kappibw commented Nov 11, 2022

When installing PICASO 3.0 from git and using the setup.py script, the script failed for pysynphot (first for missing numpy), which I had to fetch manually.

Initial run of setup.py install, in a totally fresh conda environement (python 3.8.13) , with just git clone https://github.com/natashabatalha/picaso.git:

Reading https://pypi.org/simple/pysynphot/
Downloading https://files.pythonhosted.org/packages/53/7e/44eb1e24af0c81613cc591f31fbb614001d696ff889a032871d1c0f4d1df/pysynphot-2.0.0.tar.gz#sha256=45c29f69248ec8a641c38625d11409dd2411ea1d6faffd8c3b44da354c4d22e7
Best match: pysynphot 2.0.0
Processing pysynphot-2.0.0.tar.gz
Writing /var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-o3ewd7ts/pysynphot-2.0.0/setup.cfg
Running pysynphot-2.0.0/setup.py -q bdist_egg --dist-dir /var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-o3ewd7ts/pysynphot-2.0.0/egg-dist-tmp-v8tg9t3e
Traceback (most recent call last):
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 156, in save_modules
    yield saved
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-o3ewd7ts/pysynphot-2.0.0/setup.py", line 3, in <module>
    # This sample setup.py can be used as a template for any project using d2to1.
ModuleNotFoundError: No module named 'numpy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 42, in <module>
    setup(
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/install.py", line 131, in do_egg_install
    cmd.run(show_deprecation=False)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 420, in run
    self.easy_install(spec, not self.no_deps)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 662, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 709, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 754, in process_distribution
    distros = WorkingSet([]).resolve(
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
    dist = best[req.key] = env.best_match(
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
    return self.obtain(req, installer)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
    return installer(requirement)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 681, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 707, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 900, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1174, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1158, in run_setup
    run_setup(setup_script, args)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 262, in run_setup
    raise
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 169, in save_modules
    saved_exc.resume()
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 143, in resume
    raise exc.with_traceback(self._tb)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 156, in save_modules
    yield saved
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 198, in setup_context
    yield
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-o3ewd7ts/pysynphot-2.0.0/setup.py", line 3, in <module>
    # This sample setup.py can be used as a template for any project using d2to1.
ModuleNotFoundError: No module named 'numpy' 

Ran conda install numpy, then install.py setup again:

Reading https://pypi.org/simple/pysynphot/
Downloading https://files.pythonhosted.org/packages/53/7e/44eb1e24af0c81613cc591f31fbb614001d696ff889a032871d1c0f4d1df/pysynphot-2.0.0.tar.gz#sha256=45c29f69248ec8a641c38625d11409dd2411ea1d6faffd8c3b44da354c4d22e7
Best match: pysynphot 2.0.0
Processing pysynphot-2.0.0.tar.gz
Writing /var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-gb58f5o8/pysynphot-2.0.0/setup.cfg
Running pysynphot-2.0.0/setup.py -q bdist_egg --dist-dir /var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-gb58f5o8/pysynphot-2.0.0/egg-dist-tmp-qodtr664
/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
listing git files failed - pretending there aren't any
listing git files failed - pretending there aren't any
no previously-included directories found matching 'build'
no previously-included directories found matching 'doc/build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.o' found anywhere in distribution
/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
In file included from pysynphot/src/pysynphot_utils.c:2:
In file included from /Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5:
In file included from /Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948:
/Users/kappi/miniconda3/envs/git_picaso/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with " \
 ^
pysynphot/src/pysynphot_utils.c:40:27: warning: variable 'out_arr_len' is uninitialized when used here [-Wuninitialized]
  out_dim[0] = (npy_intp) out_arr_len;
                          ^~~~~~~~~~~
pysynphot/src/pysynphot_utils.c:6:24: note: initialize the variable 'out_arr_len' to silence this warning
  const int out_arr_len;
                       ^
                        = 0
2 warnings generated.
No eggs found in /var/folders/ft/tj4pw82n3w31kn4wlkk447n80000gn/T/easy_install-gb58f5o8/pysynphot-2.0.0/egg-dist-tmp-qodtr664 (setup script problem?)
error: The 'pysynphot' distribution was not found and is required by picaso

Solution : conda install -c conda-forge pysynphot

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

No branches or pull requests

2 participants