question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't import convolution after python update to 3.7.4

See original GitHub issue

After last conda revision:

2019-08-12 16:24:32  (rev 57)
     anaconda  {2019.07 -> custom}
     bokeh  {1.2.0 -> 1.3.4}
     ca-certificates  {2019.5.15 -> 2019.5.15}
     certifi  {2019.6.16 -> 2019.6.16}
     chardet  {3.0.4 -> 3.0.4}
     dask  {2.1.0 -> 2.2.0}
     dask-core  {2.1.0 -> 2.2.0}
     distributed  {2.1.0 -> 2.2.0}
     docutils  {0.14 -> 0.15.1}
     importlib_metadata  {0.17 -> 0.19}
     ipython  {7.6.1 -> 7.7.0}
     ipywidgets  {7.5.0 -> 7.5.1}
     json5  {0.8.4 -> 0.8.5}
     jupyterlab_server  {1.0.0 -> 1.0.0}
     more-itertools  {7.0.0 -> 7.2.0}
     pandas  {0.24.2 -> 0.25.0}
     pytest-remotedata  {0.3.1 -> 0.3.2}
     python  {3.7.3 -> 3.7.4}
     python-libarchive-c  {2.8 -> 2.8}
     qtconsole  {4.5.1 -> 4.5.2}
     soupsieve  {1.8 -> 1.9.2}
     statsmodels  {0.10.0 -> 0.10.1}
     wurlitzer  {1.0.2 -> 1.0.3}
     zipp  {0.5.1 -> 0.5.2}
    +_anaconda_depends-2019.03
    +fsspec-0.4.0
    +tbb-2019.4

Couldn’t import convolution anymore:

from astropy.convolution import *                                                                                                                                                         
7.4.0
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
/opt/anaconda/lib/python3.7/site-packages/astropy/convolution/convolve.py in <module>
     26 try:
---> 27     _convolve = load_library("_convolve", LIBRARY_PATH)
     28 except Exception:

/opt/anaconda/lib/python3.7/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
    156         ## if no successful return in the libname_ext loop:
--> 157         raise OSError("no file with expected extension")
    158 

OSError: no file with expected extension

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-36349150199c> in <module>
----> 1 from astropy.convolution import *

/opt/anaconda/lib/python3.7/site-packages/astropy/convolution/__init__.py in <module>
      6 from .utils import discretize_model  # noqa
      7 
----> 8 from .convolve import convolve, convolve_fft, interpolate_replace_nans, convolve_models  # noqa

/opt/anaconda/lib/python3.7/site-packages/astropy/convolution/convolve.py in <module>
     27     _convolve = load_library("_convolve", LIBRARY_PATH)
     28 except Exception:
---> 29     raise ImportError("Convolution C extension is missing. Try re-building astropy.")
     30 
     31 # The GIL is automatically released by default when calling functions imported

ImportError: Convolution C extension is missing. Try re-building astropy.

Probably related to https://github.com/astropy/astropy/issues/8032

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
bsipoczcommented, Aug 13, 2019

A fix for this is expected to be out later today (once that’s done, we’ll remove the version pinning in ci-helpers, too): https://github.com/ContinuumIO/anaconda-issues/issues/11195

1reaction
jamienosscommented, Aug 13, 2019

@mroldrobot My apologies, in https://github.com/astropy/astropy/issues/9122#issuecomment-520937808 I wrote python=3.6.3 when I meant python=3.7.3 (now edited).

I just did as you did on both conda 4.7.10 and 4.7.11 and get the same behavior as I did before in that it works, I can import astropy.convolution. I get the same as you when going from python=3.6.3 -> 3.7.4, in that astropy is downgraded (no idea why), however, no such downgrade occurs for the version bump as noted in your opening comment: 3.7.3 -> 3.7.4.

With conda 4.7.11 and conda create -n astropy-9122 python=3.6.3 astropy;conda activate astropy-9122;conda install python=3.7.4

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/jnoss/anaconda3/envs/9122

  added / updated specs:
    - python=3.7.4


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    astropy-2.0.9              |   py37h1d22016_1         5.3 MB
    pytest-3.2.2               |             py_0         129 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         5.4 MB

The following packages will be REMOVED:

  atomicwrites-1.3.0-py36_1
  attrs-19.1.0-py36_1
  more-itertools-7.2.0-py36_0
  packaging-19.0-py36_0
  psutil-5.6.3-py36h1de35cc_0
  pytest-arraydiff-0.3-py36h39e3cac_0
  pytest-astropy-0.5.0-py36_0
  pytest-doctestplus-0.3.0-py36_0
  pytest-openfiles-0.3.2-py36_0
  pytest-remotedata-0.3.2-py36_0
  six-1.12.0-py36_0
  wcwidth-0.1.7-py36h8c6ec74_0

The following packages will be UPDATED:

  openssl                                 1.0.2s-h1de35cc_0 --> 1.1.1c-h1de35cc_1
  python                                   3.6.3-h47c878a_7 --> 3.7.4-h359304d_0

The following packages will be SUPERSEDED by a higher-priority channel:

  pytest              pkgs/main/osx-64::pytest-5.0.1-py36_0 --> conda-forge/noarch::pytest-3.2.2-py_0

The following packages will be DOWNGRADED:

  astropy                              3.2.1-py36h1de35cc_0 --> 2.0.9-py37h1d22016_1
  certifi                                  2019.6.16-py36_1 --> 2019.6.16-py37_1
  importlib_metadata                            0.19-py36_0 --> 0.19-py37_0
  mkl_fft                             1.0.12-py36h5e564d8_0 --> 1.0.12-py37h5e564d8_0
  mkl_random                           1.0.2-py36h27c97d8_0 --> 1.0.2-py37h27c97d8_0
  numpy                               1.16.4-py36hacdab7b_0 --> 1.16.4-py37hacdab7b_0
  numpy-base                          1.16.4-py36h6575580_0 --> 1.16.4-py37h6575580_0
  pip                                         19.1.1-py36_0 --> 19.1.1-py37_0
  py                                           1.8.0-py36_0 --> 1.8.0-py37_0
  setuptools                                  41.0.1-py36_0 --> 41.0.1-py37_0
  wheel                                       0.33.4-py36_0 --> 0.33.4-py37_0

However, with conda 4.7.10 and 4.7.11 I get no downgrade of astropy for the python update from 3.7.3 -> 3.7.4, and I can successfully import astropy.convolution.

conda install python=3.7.4
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.7.10
  latest version: 4.7.11

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /Users/jnoss/anaconda3/envs/astropy-9122

  added / updated specs:
    - python=3.7.4


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    python-3.7.4               |       h359304d_0        21.6 MB
    ------------------------------------------------------------
                                           Total:        21.6 MB

The following packages will be UPDATED:

  python                                   3.7.3-h359304d_0 --> 3.7.4-h359304d_0
Read more comments on GitHub >

github_iconTop Results From Across the Web

I cannot import a module to Python 3.7 since it is directed to ...
The Python code you posted seems to be MicroPython code that's intended to run on the ESP32, not on your Raspberry Pi:.
Read more >
The Definitive Guide to Conda Environments
Conda environments are like cousins of Python's virtual environments. Both serve to help manage dependencies and isolate projects, ...
Read more >
Porting Python 2 Code to Python 3 — Python 3.11.1 ...
Use Futurize (or Modernize) to update your code (e.g. python -m pip install future ) ... Since then users have been encouraged to...
Read more >
typing-extensions - PyPI
In typing since Python 3.10. Concatenate (see PEP 612); ParamSpec (see PEP 612; the typing_extensions version supports the default= argument from PEP 696) ......
Read more >
Python 3.9: Cool New Features for You to Try
If you rely on the tzdata package, then you should remember to update it from time to time. In particular, you shouldn't leave...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found