Skip to content

BUG: can't set up dev environment -- Import Error: C extensions: ... #34280

Closed
@joooeey

Description

@joooeey
  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

pulled out from #33821 (the main symptom was that import pandas failed (see problem description):

Yea looks like the extensions need to be rebuilt. @charlesdong1991 instructions above should work; maybe not even need the second line if you launch Python from the pandas repo

On May 19, 2020, at 1:17 PM, Kaiqi Dong @.***> wrote: @charlesdong1991 commented on this pull request. In pandas/tests/plotting/test_frame.py <#33821 (comment)>: > + def test_color_and_marker(self): + # GH21003 - code sample from 2018-05-10 is equivalent to this test + df = DataFrame(np.random.random((7, 4))) + # combining a color string and a marker letter should be allowed + df.plot(color="green", style="d") # d for diamond + + def test_color_list_and_marker(self): + # GH21003 - code sample from 2020-04-23 is equivalent to this test + df = DataFrame(np.random.random((7, 4))) + color_list = ["yellow", "red", "green", "blue"] + ax = df.plot(color=color_list, style="d") + # Before this patch was introduced, the previous line of code resulted + # in a plot where each individual line was assigned a list of colors: + # ax.lines[i].get_color() == ['yellow', 'red', 'green', 'blue'] + # which resulted in a ValueError when plt.draw() was called. + assert [line.get_color() for line in ax.lines] == color_list emm, have no idea, i really think python setup.py build_ext --inplace -j 4 python -m pip install -e . --no-build-isolation --no-use-pep517 would solve the issue @WillAyd https://github.com/WillAyd could you help with the environment issue? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#33821 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEU4UNW7DTC32C2KAWVF2LRSLSNZANCNFSM4MR622DA.

I just re-built the pandas-dev environment altogether:

I ran:
conda env remove --name pandas-dev

The pandas-joooeey folder was still there so I deleted it.

Then I ran in Git Bash:

Joey@zenbook MINGW64 ~
$ git clone https://github.com//github.com/joooeey/pandas.git pandas-joooeey
Cloning into 'pandas-joooeey'...
remote: Not Found
fatal: repository 'https://github.com//github.com/joooeey/pandas.git/' not found

Joey@zenbook MINGW64 ~
$ cd pandas-joooeey
bash: cd: pandas-joooeey: No such file or directory

Joey@zenbook MINGW64 ~
$ git clone https://github.com/joooeey/pandas.git pandas-joooeey
Cloning into 'pandas-joooeey'...
remote: Enumerating objects: 226160, done.
remote: Total 226160 (delta 0), reused 0 (delta 0), pack-reused 226160
Receiving objects: 100% (226160/226160), 183.30 MiB | 903.00 KiB/s, done.
Resolving deltas: 100% (188107/188107), done.
Updating files: 100% (1889/1889), done.

Joey@zenbook MINGW64 ~
$ cd pandas-joooeey

Joey@zenbook MINGW64 ~/pandas-joooeey (master)
$ git remote add upstream https://github.com/pandas-dev/pandas.git

And then the following commands in Anaconda Prompt (as given by doskey /history:

(pandas-dev) c:\Users\Joey\pandas-joooeey>doskey /history
cd c:\\users\joey\pandas-joooeey
conda update conda
conda env create -f environment.yml
conda activate pandas-dev
python setup.py build_ext --inplace -j 4
python -m pip install -e . --no-build-isolation --no-use-pep517
python setup.py build_ext --inplace --force
cython --version
doskey /history

None of these threw errors. However, I still get an error when I import pandas in Spyder (I made sure to open a fresh console in Spyder):

import pandas
Traceback (most recent call last):

  File "C:\Users\Joey\pandas-joooeey\pandas\__init__.py", line 32, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib

  File "C:\Users\Joey\pandas-joooeey\pandas\_libs\__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval

ModuleNotFoundError: No module named 'pandas._libs.interval'


The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "<ipython-input-1-38d4b0363d82>", line 1, in <module>
    import pandas

  File "C:\Users\Joey\pandas-joooeey\pandas\__init__.py", line 40, in <module>
    ) from e

ImportError: C extension: No module named 'pandas._libs.interval' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

I also tried re-basing master from upstream in Git Bash:

git fetch upstream
git merge upstream/master
git push

Console output:

Joey@zenbook MINGW64 ~/pandas-joooeey (master)
$ git fetch upstream
remote: Enumerating objects: 382, done.
remote: Counting objects: 100% (382/382), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 507 (delta 348), reused 336 (delta 325), pack-reused 125
Receiving objects: 100% (507/507), 239.93 KiB | 813.00 KiB/s, done.
Resolving deltas: 100% (408/408), completed with 168 local objects.
From https://github.com/pandas-dev/pandas
 * [new branch]          0.19.x               -> upstream/0.19.x
 * [new branch]          0.20.x               -> upstream/0.20.x
 * [new branch]          0.21.x               -> upstream/0.21.x
 * [new branch]          0.22.x               -> upstream/0.22.x
 * [new branch]          0.23.x               -> upstream/0.23.x
 * [new branch]          0.24.x               -> upstream/0.24.x
 * [new branch]          0.25.x               -> upstream/0.25.x
 * [new branch]          1.0.x                -> upstream/1.0.x
 * [new branch]          gh-pages             -> upstream/gh-pages
 * [new branch]          master               -> upstream/master
 * [new branch]          revert-25761-patch-1 -> upstream/revert-25761-patch-1
 * [new branch]          revert-29447-orc-reader -> upstream/revert-29447-orc-re
 * [new branch]          v0.25.2.x            -> upstream/v0.25.2.x

Joey@zenbook MINGW64 ~/pandas-joooeey (master)
$ git merge upstream/master
Updating 837daf18d..23c7e85d8
Fast-forward
 .travis.yml                                        |   24 +-
 README.md                                          |    1 +
 asv_bench/benchmarks/algorithms.py                 |   17 +-
 asv_bench/benchmarks/arithmetic.py                 |   63 +-
 asv_bench/benchmarks/groupby.py                    |   58 +
 asv_bench/benchmarks/io/parsers.py                 |    4 +-
 asv_bench/benchmarks/rolling.py                    |   25 +-
 asv_bench/benchmarks/stat_ops.py                   |    4 +-
 azure-pipelines.yml                                |    3 +
 ci/build39.sh                                      |   21 +
 ci/code_checks.sh                                  |    4 +-
 ci/deps/azure-36-minimum_versions.yaml             |    5 +-
 ci/deps/azure-37-numpydev.yaml                     |    5 +-
 ci/deps/azure-macos-36.yaml                        |    2 +-
 ci/deps/travis-37-arm64.yaml                       |   21 +
 ci/run_tests.sh                                    |    2 +-
 ci/setup_env.sh                                    |   19 +-
 conda.recipe/meta.yaml                             |    4 +-
 doc/source/conf.py                                 |    2 +-
 doc/source/development/contributing.rst            |    6 +-
 doc/source/development/extending.rst               |    2 +-
 doc/source/ecosystem.rst                           |   18 +-
 doc/source/getting_started/install.rst             |    2 +-
 .../intro_tutorials/02_read_write.rst              |    6 +-
 .../intro_tutorials/03_subset_data.rst             |    2 +-
 .../intro_tutorials/06_calculate_statistics.rst    |    8 +-
 .../intro_tutorials/07_reshape_table_layout.rst    |   16 +-
 .../intro_tutorials/08_combine_dataframes.rst      |    2 +-
 .../intro_tutorials/09_timeseries.rst              |    6 +-
 .../intro_tutorials/10_text_data.rst               |   20 +-
 doc/source/reference/extensions.rst                |    1 +
 doc/source/reference/general_utility_functions.rst |    4 +
 doc/source/reference/groupby.rst                   |    6 +-
 doc/source/reference/offset_frequency.rst          |   90 +-
 doc/source/user_guide/10min.rst                    |    2 +-
 doc/source/user_guide/basics.rst                   |   75 +-
 doc/source/user_guide/computation.rst              |   38 +-
 doc/source/user_guide/dsintro.rst                  |    6 +-
 doc/source/user_guide/enhancingperf.rst            |   16 +-
 doc/source/user_guide/gotchas.rst                  |    2 +-
 doc/source/user_guide/groupby.rst                  |   94 +
 doc/source/user_guide/indexing.rst                 |    2 +-
 doc/source/user_guide/reshaping.rst                |   14 +-
 doc/source/user_guide/sparse.rst                   |    2 +-
 doc/source/user_guide/timeseries.rst               |   79 +-
 doc/source/whatsnew/v0.18.0.rst                    |   10 +-
 doc/source/whatsnew/v0.18.1.rst                    |   34 +-
 doc/source/whatsnew/v0.19.0.rst                    |   46 +-
 doc/source/whatsnew/v0.19.1.rst                    |    4 +-
 doc/source/whatsnew/v0.19.2.rst                    |    4 +-
 doc/source/whatsnew/v0.20.0.rst                    |   32 +-
 doc/source/whatsnew/v0.20.2.rst                    |   10 +-
 doc/source/whatsnew/v0.20.3.rst                    |    8 +-
 doc/source/whatsnew/v0.21.0.rst                    |   26 +-
 doc/source/whatsnew/v0.21.1.rst                    |   10 +-
 doc/source/whatsnew/v1.1.0.rst                     |  259 ++-
 environment.yml                                    |    4 +-
 pandas/__init__.py                                 |    2 -
 pandas/_libs/groupby.pyx                           |    4 +-
 pandas/_libs/hashtable.pyx                         |    5 +-
 pandas/_libs/hashtable_class_helper.pxi.in         |   44 +-
 pandas/_libs/hashtable_func_helper.pxi.in          |    2 +-
 pandas/_libs/index.pyx                             |   48 +-
 pandas/_libs/internals.pyx                         |    5 +-
 pandas/_libs/interval.pyx                          |   62 +-
 pandas/_libs/lib.pxd                               |    2 +-
 pandas/_libs/lib.pyx                               |   67 +-
 pandas/_libs/missing.pxd                           |    2 +-
 pandas/_libs/missing.pyx                           |   18 +-
 pandas/_libs/parsers.pyx                           |    2 +-
 pandas/_libs/reduction.pyx                         |    4 +-
 pandas/_libs/reshape.pyx                           |    5 +-
 pandas/_libs/src/parser/tokenizer.h                |    4 +-
 pandas/_libs/src/ujson/lib/ultrajson.h             |    2 +-
 pandas/_libs/src/ujson/python/objToJSON.c          |   17 +-
 pandas/_libs/testing.pyx                           |   11 +-
 pandas/_libs/tslib.pyx                             |   32 +-
 pandas/_libs/tslibs/__init__.py                    |   10 +-
 pandas/_libs/tslibs/base.pxd                       |    8 +
 pandas/_libs/tslibs/base.pyx                       |   16 +
 pandas/_libs/tslibs/c_timestamp.pxd                |   17 -
 pandas/_libs/tslibs/c_timestamp.pyx                |  434 ----
 pandas/_libs/tslibs/ccalendar.pxd                  |    4 +
 pandas/_libs/tslibs/ccalendar.pyx                  |    4 +
 pandas/_libs/tslibs/conversion.pyx                 |   77 +-
 pandas/_libs/tslibs/fields.pyx                     |    6 +-
 pandas/_libs/tslibs/frequencies.pxd                |    4 +-
 pandas/_libs/tslibs/frequencies.pyx                |   93 +-
 pandas/_libs/tslibs/nattype.pxd                    |    2 +-
 pandas/_libs/tslibs/nattype.pyx                    |   20 +-
 pandas/_libs/tslibs/np_datetime.pxd                |    2 -
 pandas/_libs/tslibs/np_datetime.pyx                |    9 -
 pandas/_libs/tslibs/offsets.pxd                    |    2 +
 pandas/_libs/tslibs/offsets.pyx                    |  779 ++++++-
 pandas/_libs/tslibs/parsing.pyx                    |   23 +-
 pandas/_libs/tslibs/period.pxd                     |    1 +
 pandas/_libs/tslibs/period.pyx                     |  163 +-
 pandas/_libs/tslibs/resolution.pyx                 |   70 +-
 pandas/_libs/tslibs/strptime.pyx                   |   13 +-
 pandas/_libs/tslibs/timedeltas.pyx                 |  247 +--
 pandas/_libs/tslibs/timestamps.pxd                 |   20 +
 pandas/_libs/tslibs/timestamps.pyx                 |  426 +++-
 pandas/_libs/tslibs/timezones.pxd                  |    9 +-
 pandas/_libs/tslibs/timezones.pyx                  |   21 +-
 pandas/_libs/tslibs/tzconversion.pxd               |    1 -
 pandas/_libs/tslibs/tzconversion.pyx               |   14 +-
 pandas/_libs/tslibs/util.pxd                       |   42 +-
 pandas/_libs/window/aggregations.pyx               |   16 +-
 pandas/_testing.py                                 |   64 +-
 pandas/_typing.py                                  |   16 +
 pandas/compat/__init__.py                          |    1 +
 pandas/compat/_optional.py                         |    2 +-
 pandas/compat/numpy/__init__.py                    |   10 +-
 pandas/compat/numpy/function.py                    |   12 +-
 pandas/compat/pickle_compat.py                     |   38 +
 pandas/conftest.py                                 |   28 +-
 pandas/core/accessor.py                            |    2 +-
 pandas/core/aggregation.py                         |    4 +-
 pandas/core/algorithms.py                          |  100 +-
 pandas/core/array_algos/transforms.py              |    5 +-
 pandas/core/arrays/_mixins.py                      |  122 ++
 pandas/core/arrays/_ranges.py                      |  107 +-
 pandas/core/arrays/base.py                         |   67 +-
 pandas/core/arrays/boolean.py                      |   33 +-
 pandas/core/arrays/categorical.py                  |  166 +-
 pandas/core/arrays/datetimelike.py                 |  537 +++--
 pandas/core/arrays/datetimes.py                    |  138 +-
 pandas/core/arrays/integer.py                      |   38 +-
 pandas/core/arrays/interval.py                     |   26 +-
 pandas/core/arrays/masked.py                       |   35 +-
 pandas/core/arrays/numpy_.py                       |   85 +-
 pandas/core/arrays/period.py                       |   81 +-
 pandas/core/arrays/sparse/array.py                 |   55 +-
 pandas/core/arrays/sparse/dtype.py                 |   26 +-
 pandas/core/arrays/string_.py                      |    9 +
 pandas/core/arrays/timedeltas.py                   |  143 +-
 pandas/core/base.py                                |    7 +-
 pandas/core/common.py                              |   43 +-
 pandas/core/computation/expr.py                    |    2 +-
 pandas/core/computation/expressions.py             |    4 +-
 pandas/core/config_init.py                         |    5 +-
 pandas/core/construction.py                        |   69 +-
 pandas/core/dtypes/base.py                         |   32 +-
 pandas/core/dtypes/cast.py                         |   92 +-
 pandas/core/dtypes/common.py                       |    2 -
 pandas/core/dtypes/concat.py                       |  150 +-
 pandas/core/dtypes/dtypes.py                       |   37 +-
 pandas/core/dtypes/generic.py                      |    2 -
 pandas/core/dtypes/missing.py                      |  123 +-
 pandas/core/frame.py                               |  344 ++-
 pandas/core/generic.py                             |  277 ++-
 pandas/core/groupby/generic.py                     |  178 +-
 pandas/core/groupby/groupby.py                     |  366 +++-
 pandas/core/groupby/grouper.py                     |  156 +-
 pandas/core/groupby/ops.py                         |  129 +-
 pandas/core/indexers.py                            |    2 +-
 pandas/core/indexes/accessors.py                   |    6 +-
 pandas/core/indexes/api.py                         |    3 +-
 pandas/core/indexes/base.py                        |  107 +-
 pandas/core/indexes/category.py                    |   16 +-
 pandas/core/indexes/datetimelike.py                |  279 +--
 pandas/core/indexes/datetimes.py                   |   28 +-
 pandas/core/indexes/extension.py                   |   46 +-
 pandas/core/indexes/interval.py                    |    2 +-
 pandas/core/indexes/multi.py                       |   10 +-
 pandas/core/indexes/numeric.py                     |    4 -
 pandas/core/indexes/period.py                      |   61 +-
 pandas/core/indexes/range.py                       |   14 +-
 pandas/core/indexes/timedeltas.py                  |   35 +-
 pandas/core/indexing.py                            |   45 +-
 pandas/core/internals/__init__.py                  |   10 +-
 pandas/core/internals/blocks.py                    |   40 +-
 pandas/core/internals/concat.py                    |   15 +-
 pandas/core/internals/construction.py              |   69 +-
 pandas/core/internals/managers.py                  |  126 +-
 pandas/core/missing.py                             |  103 +-
 pandas/core/nanops.py                              |  118 +-
 pandas/core/ops/__init__.py                        |   68 +-
 pandas/core/ops/array_ops.py                       |   21 +-
 pandas/core/ops/blockwise.py                       |  102 +
 pandas/core/ops/dispatch.py                        |   14 +-
 pandas/core/ops/docstrings.py                      |    4 +-
 pandas/core/ops/methods.py                         |   10 +-
 pandas/core/resample.py                            |  213 +-
 pandas/core/reshape/concat.py                      |   12 +-
 pandas/core/reshape/melt.py                        |   13 +-
 pandas/core/reshape/merge.py                       |   42 +-
 pandas/core/reshape/pivot.py                       |   40 +-
 pandas/core/reshape/reshape.py                     |    6 +-
 pandas/core/reshape/tile.py                        |   46 +-
 pandas/core/series.py                              |  204 +-
 pandas/core/sorting.py                             |  144 +-
 pandas/core/strings.py                             |   71 +-
 pandas/core/tools/datetimes.py                     |  192 +-
 pandas/core/tools/numeric.py                       |    7 +-
 pandas/core/tools/timedeltas.py                    |    4 +-
 pandas/core/tools/times.py                         |  141 ++
 pandas/core/util/numba_.py                         |   52 +-
 pandas/core/window/common.py                       |   27 +-
 pandas/core/window/ewm.py                          |   10 +-
 pandas/core/window/expanding.py                    |   11 +-
 pandas/core/window/rolling.py                      |  159 +-
 pandas/errors/__init__.py                          |   18 +-
 pandas/io/clipboard/__init__.py                    |    2 +-
 pandas/io/common.py                                |   27 +
 pandas/io/feather_format.py                        |   12 +-
 pandas/io/formats/excel.py                         |   18 +-
 pandas/io/formats/format.py                        |   28 +-
 pandas/io/formats/html.py                          |   10 +-
 pandas/io/formats/info.py                          |   70 +-
 pandas/io/formats/style.py                         |    4 +-
 pandas/io/gcs.py                                   |    6 +-
 pandas/io/json/_json.py                            |    2 +-
 pandas/io/json/_normalize.py                       |    2 +-
 pandas/io/json/_table_schema.py                    |   26 +-
 pandas/io/parquet.py                               |   35 +-
 pandas/io/parsers.py                               |    6 +-
 pandas/io/pickle.py                                |    3 +-
 pandas/io/pytables.py                              |   52 +-
 pandas/io/s3.py                                    |    8 +-
 pandas/io/sas/sas7bdat.py                          |    3 +-
 pandas/io/sas/sas_xport.py                         |    3 +-
 pandas/io/sas/sasreader.py                         |   19 +
 pandas/io/sql.py                                   |    4 +-
 pandas/io/stata.py                                 |  125 +-
 pandas/plotting/_core.py                           |   40 +-
 pandas/plotting/_matplotlib/boxplot.py             |    3 +-
 pandas/plotting/_matplotlib/converter.py           |   59 +-
 pandas/plotting/_matplotlib/core.py                |   10 +-
 pandas/plotting/_matplotlib/hist.py                |    4 +-
 pandas/plotting/_matplotlib/misc.py                |    2 +-
 pandas/plotting/_matplotlib/timeseries.py          |   37 +-
 pandas/plotting/_matplotlib/tools.py               |    2 +-
 pandas/plotting/_misc.py                           |  117 +-
 pandas/tests/api/test_api.py                       |    2 -
 pandas/tests/arithmetic/common.py                  |    9 +-
 pandas/tests/arithmetic/conftest.py                |   28 +-
 pandas/tests/arithmetic/test_datetime64.py         |  147 +-
 pandas/tests/arithmetic/test_interval.py           |   17 +-
 pandas/tests/arithmetic/test_numeric.py            |   10 +-
 pandas/tests/arithmetic/test_period.py             |   74 +-
 pandas/tests/arithmetic/test_timedelta64.py        |  152 +-
 pandas/tests/arrays/boolean/test_logical.py        |    1 +
 pandas/tests/arrays/categorical/test_analytics.py  |   32 +
 .../tests/arrays/categorical/test_constructors.py  |    2 +
 pandas/tests/arrays/categorical/test_missing.py    |   53 +-
 pandas/tests/arrays/integer/test_comparison.py     |   10 +
 pandas/tests/arrays/integer/test_concat.py         |   26 +
 pandas/tests/arrays/integer/test_function.py       |   20 +
 pandas/tests/arrays/sparse/test_array.py           |   19 +
 pandas/tests/arrays/string_/test_string.py         |   55 +
 pandas/tests/arrays/test_datetimelike.py           |  126 +-
 pandas/tests/arrays/test_datetimes.py              |   34 +
 pandas/tests/base/test_conversion.py               |   58 +-
 pandas/tests/base/test_fillna.py                   |    4 +-
 pandas/tests/base/test_misc.py                     |    6 +-
 pandas/tests/base/test_unique.py                   |   10 +-
 pandas/tests/base/test_value_counts.py             |    4 +-
 pandas/tests/dtypes/cast/test_promote.py           |   15 +-
 pandas/tests/dtypes/test_common.py                 |    4 +
 pandas/tests/dtypes/test_dtypes.py                 |    4 +
 pandas/tests/dtypes/test_generic.py                |    6 +-
 pandas/tests/dtypes/test_inference.py              |  117 +-
 pandas/tests/extension/arrow/test_bool.py          |   18 +
 pandas/tests/extension/base/constructors.py        |   33 +
 pandas/tests/extension/base/dtype.py               |    9 +-
 pandas/tests/extension/base/getitem.py             |    3 +-
 pandas/tests/extension/base/methods.py             |   60 +-
 pandas/tests/extension/base/missing.py             |    7 +
 pandas/tests/extension/base/ops.py                 |   18 +-
 pandas/tests/extension/decimal/test_decimal.py     |    4 +
 pandas/tests/extension/json/array.py               |    6 +
 pandas/tests/extension/json/test_json.py           |   35 +-
 pandas/tests/extension/test_boolean.py             |   39 +-
 pandas/tests/extension/test_categorical.py         |   47 +-
 pandas/tests/extension/test_datetime.py            |    9 +
 pandas/tests/extension/test_numpy.py               |   35 +-
 pandas/tests/extension/test_period.py              |   11 +-
 pandas/tests/extension/test_sparse.py              |   12 +
 pandas/tests/extension/test_string.py              |   11 +-
 pandas/tests/frame/indexing/test_indexing.py       |    2 +-
 pandas/tests/frame/methods/test_astype.py          |  559 +++++
 pandas/tests/frame/methods/test_at_time.py         |    4 +
 pandas/tests/frame/methods/test_cov_corr.py        |   27 +
 pandas/tests/frame/methods/test_drop_duplicates.py |    7 +
 pandas/tests/frame/methods/test_interpolate.py     |   12 +
 pandas/tests/frame/methods/test_replace.py         |    8 +
 pandas/tests/frame/methods/test_round.py           |    5 -
 pandas/tests/frame/methods/test_set_index.py       |  532 +++++
 pandas/tests/frame/methods/test_shift.py           |    6 +-
 pandas/tests/frame/methods/test_sort_index.py      |  418 +++-
 pandas/tests/frame/methods/test_sort_values.py     |  162 ++
 pandas/tests/frame/methods/test_truncate.py        |   17 +
 pandas/tests/frame/methods/test_tz_convert.py      |    6 +
 pandas/tests/frame/test_alter_axes.py              |  523 +----
 pandas/tests/frame/test_analytics.py               |   60 +-
 pandas/tests/frame/test_api.py                     |    2 +-
 pandas/tests/frame/test_arithmetic.py              |   19 +-
 pandas/tests/frame/test_axis_select_reindex.py     |    3 +-
 pandas/tests/frame/test_cumulative.py              |   13 +-
 pandas/tests/frame/test_dtypes.py                  |  546 +----
 pandas/tests/frame/test_query_eval.py              |   36 +
 pandas/tests/frame/test_subclass.py                |  133 +-
 pandas/tests/frame/test_to_csv.py                  |    5 +
 pandas/tests/groupby/aggregate/test_aggregate.py   |    8 +
 pandas/tests/groupby/aggregate/test_numba.py       |  115 +
 pandas/tests/groupby/test_apply.py                 |   20 +
 pandas/tests/groupby/test_categorical.py           |   19 +-
 pandas/tests/groupby/test_counting.py              |  135 +-
 pandas/tests/groupby/test_function.py              |  666 +-----
 pandas/tests/groupby/test_groupby_dropna.py        |  244 +++
 pandas/tests/groupby/test_groupby_subclass.py      |   77 +
 pandas/tests/groupby/test_nth.py                   |   12 +
 pandas/tests/groupby/test_nunique.py               |  165 ++
 pandas/tests/groupby/test_pipe.py                  |   78 +
 pandas/tests/groupby/test_quantile.py              |  217 ++
 pandas/tests/groupby/test_size.py                  |   46 +
 pandas/tests/groupby/test_timegrouper.py           |   27 +-
 pandas/tests/groupby/transform/test_numba.py       |    9 +-
 pandas/tests/indexes/categorical/test_astype.py    |   66 +
 pandas/tests/indexes/categorical/test_category.py  |   63 +-
 pandas/tests/indexes/categorical/test_indexing.py  |   37 +
 pandas/tests/indexes/common.py                     |   10 +-
 pandas/tests/indexes/datetimelike.py               |   11 +-
 pandas/tests/indexes/datetimes/test_astype.py      |   47 +-
 .../tests/indexes/datetimes/test_constructors.py   |   15 +-
 pandas/tests/indexes/datetimes/test_date_range.py  |   46 +-
 pandas/tests/indexes/datetimes/test_datetime.py    |   73 +-
 pandas/tests/indexes/datetimes/test_indexing.py    |   42 +-
 pandas/tests/indexes/datetimes/test_insert.py      |   23 +
 pandas/tests/indexes/datetimes/test_map.py         |   41 +
 pandas/tests/indexes/datetimes/test_ops.py         |   42 +-
 .../indexes/datetimes/test_partial_slicing.py      |  104 +-
 pandas/tests/indexes/datetimes/test_pickle.py      |   41 +
 pandas/tests/indexes/datetimes/test_setops.py      |   14 +-
 pandas/tests/indexes/datetimes/test_timezones.py   |   36 +-
 pandas/tests/indexes/interval/test_indexing.py     |    9 +
 pandas/tests/indexes/interval/test_interval.py     |   30 +-
 pandas/tests/indexes/multi/test_analytics.py       |    2 +-
 pandas/tests/indexes/multi/test_indexing.py        |    5 +-
 pandas/tests/indexes/multi/test_join.py            |   12 +-
 .../tests/indexes/multi/test_partial_indexing.py   |   61 +-
 pandas/tests/indexes/multi/test_take.py            |    3 -
 pandas/tests/indexes/numeric/test_astype.py        |   83 +
 pandas/tests/indexes/period/test_astype.py         |   14 +-
 pandas/tests/indexes/period/test_factorize.py      |   37 +
 pandas/tests/indexes/period/test_indexing.py       |   62 +-
 .../tests/indexes/period/test_partial_slicing.py   |  183 +-
 pandas/tests/indexes/period/test_period.py         |   52 -
 pandas/tests/indexes/period/test_period_range.py   |    8 +
 pandas/tests/indexes/period/test_to_timestamp.py   |    3 +-
 pandas/tests/indexes/test_base.py                  |   17 +-
 pandas/tests/indexes/test_common.py                |    4 +-
 pandas/tests/indexes/test_index_new.py             |    5 +-
 pandas/tests/indexes/test_numeric.py               |   76 +-
 pandas/tests/indexes/test_numpy_compat.py          |    4 +-
 .../tests/indexes/timedeltas/test_constructors.py  |   11 +
 pandas/tests/indexes/timedeltas/test_indexing.py   |   14 +-
 pandas/tests/indexes/timedeltas/test_insert.py     |   11 +
 pandas/tests/indexes/timedeltas/test_ops.py        |   25 +-
 .../indexes/timedeltas/test_partial_slicing.py     |   42 +-
 .../tests/indexes/timedeltas/test_searchsorted.py  |   26 +
 pandas/tests/indexes/timedeltas/test_setops.py     |    2 +-
 pandas/tests/indexes/timedeltas/test_timedelta.py  |   32 +-
 .../indexes/timedeltas/test_timedelta_range.py     |   20 +-
 pandas/tests/indexing/multiindex/test_loc.py       |   20 +-
 pandas/tests/indexing/multiindex/test_partial.py   |    3 +-
 pandas/tests/indexing/multiindex/test_slice.py     |   10 +-
 pandas/tests/indexing/multiindex/test_sorted.py    |   30 +-
 pandas/tests/indexing/test_categorical.py          |   22 +-
 pandas/tests/indexing/test_chaining_and_caching.py |    3 -
 pandas/tests/indexing/test_coercion.py             |  150 +-
 pandas/tests/indexing/test_datetime.py             |   13 +-
 pandas/tests/indexing/test_indexing.py             |    3 +-
 pandas/tests/indexing/test_loc.py                  |   13 +
 pandas/tests/indexing/test_partial.py              |  123 +-
 pandas/tests/internals/test_internals.py           |    2 +-
 pandas/tests/io/conftest.py                        |   10 +-
 pandas/tests/io/data/stata/stata-compat-105.dta    |  Bin 0 -> 771 bytes
 pandas/tests/io/data/stata/stata-compat-108.dta    |  Bin 0 -> 1128 bytes
 pandas/tests/io/data/stata/stata-compat-111.dta    |  Bin 0 -> 1514 bytes
 pandas/tests/io/data/stata/stata-compat-113.dta    |  Bin 0 -> 1514 bytes
 pandas/tests/io/data/stata/stata-compat-114.dta    |  Bin 0 -> 1810 bytes
 pandas/tests/io/data/stata/stata-compat-118.dta    |  Bin 0 -> 5798 bytes
 pandas/tests/io/excel/test_openpyxl.py             |    1 -
 pandas/tests/io/excel/test_style.py                |    8 +-
 pandas/tests/io/excel/test_writers.py              |   14 +
 pandas/tests/io/formats/test_css.py                |    2 -
 pandas/tests/io/formats/test_format.py             |   57 +
 pandas/tests/io/json/test_normalize.py             |   20 +
 pandas/tests/io/json/test_pandas.py                |   25 +-
 pandas/tests/io/json/test_ujson.py                 |    3 +-
 pandas/tests/io/parser/test_common.py              |    9 +
 pandas/tests/io/parser/test_dtypes.py              |    3 +-
 pandas/tests/io/parser/test_network.py             |   32 +-
 pandas/tests/io/parser/test_parse_dates.py         |   25 +-
 pandas/tests/io/parser/test_usecols.py             |   10 +-
 pandas/tests/io/pytables/test_store.py             |   64 +-
 pandas/tests/io/pytables/test_timezones.py         |   28 +-
 pandas/tests/io/test_common.py                     |    5 +
 pandas/tests/io/test_feather.py                    |   29 +-
 pandas/tests/io/test_parquet.py                    |   50 +-
 pandas/tests/io/test_sql.py                        |    4 +-
 pandas/tests/io/test_stata.py                      |   74 +-
 pandas/tests/plotting/test_datetimelike.py         |    4 +-
 pandas/tests/plotting/test_hist_method.py          |   24 +
 pandas/tests/reductions/test_reductions.py         |    6 +-
 pandas/tests/resample/test_base.py                 |   36 +-
 pandas/tests/resample/test_datetime_index.py       |  327 ++-
 pandas/tests/resample/test_deprecated.py           |  263 +++
 pandas/tests/resample/test_period_index.py         |   95 +-
 pandas/tests/resample/test_resample_api.py         |    8 +-
 pandas/tests/resample/test_resampler_grouper.py    |   42 +
 pandas/tests/resample/test_time_grouper.py         |   26 +-
 pandas/tests/resample/test_timedelta.py            |   39 +-
 pandas/tests/reshape/merge/test_merge.py           |   32 +-
 pandas/tests/reshape/merge/test_multi.py           |    6 +-
 pandas/tests/reshape/test_concat.py                |   48 +-
 pandas/tests/reshape/test_cut.py                   |   39 +
 pandas/tests/reshape/test_pivot.py                 |   38 +-
 pandas/tests/scalar/interval/test_arithmetic.py    |   47 +
 pandas/tests/scalar/interval/test_interval.py      |    5 +-
 pandas/tests/scalar/period/test_period.py          |   22 +-
 pandas/tests/scalar/test_nat.py                    |    9 +-
 pandas/tests/scalar/timedelta/test_arithmetic.py   |   42 +-
 pandas/tests/scalar/timestamp/test_arithmetic.py   |    2 +-
 pandas/tests/scalar/timestamp/test_comparisons.py  |    4 +-
 pandas/tests/series/indexing/test_alter_index.py   |    2 +
 pandas/tests/series/indexing/test_datetime.py      |    6 +-
 pandas/tests/series/indexing/test_getitem.py       |   13 +
 pandas/tests/series/indexing/test_indexing.py      |   69 +-
 pandas/tests/series/methods/test_asof.py           |    4 +-
 pandas/tests/series/methods/test_astype.py         |   25 +
 pandas/tests/series/methods/test_at_time.py        |    5 +
 pandas/tests/series/methods/test_droplevel.py      |    2 +-
 pandas/tests/series/methods/test_interpolate.py    |   31 +-
 pandas/tests/series/methods/test_rank.py           |    2 +-
 pandas/tests/series/methods/test_shift.py          |    5 +-
 pandas/tests/series/methods/test_sort_index.py     |  154 +-
 pandas/tests/series/methods/test_sort_values.py    |   28 +
 pandas/tests/series/methods/test_to_dict.py        |    8 +-
 pandas/tests/series/methods/test_to_period.py      |   10 +
 pandas/tests/series/methods/test_to_timestamp.py   |   13 +-
 pandas/tests/series/methods/test_truncate.py       |   17 +
 pandas/tests/series/methods/test_tz_localize.py    |    6 +-
 pandas/tests/series/methods/test_update.py         |   54 +-
 pandas/tests/series/test_apply.py                  |   17 +-
 pandas/tests/series/test_arithmetic.py             |   35 +-
 pandas/tests/series/test_constructors.py           |   41 +-
 pandas/tests/series/test_cumulative.py             |   13 +-
 pandas/tests/series/test_datetime_values.py        |    7 +-
 pandas/tests/series/test_dtypes.py                 |    6 +-
 pandas/tests/series/test_io.py                     |    2 +
 pandas/tests/series/test_missing.py                |    9 +-
 pandas/tests/series/test_operators.py              |   54 +-
 pandas/tests/series/test_subclass.py               |   16 +
 pandas/tests/series/test_timeseries.py             |    1 +
 pandas/tests/test_algos.py                         |   72 +
 pandas/tests/test_downstream.py                    |   11 +-
 pandas/tests/test_errors.py                        |    1 +
 pandas/tests/test_expressions.py                   |    2 -
 pandas/tests/test_multilevel.py                    |  328 +--
 pandas/tests/test_strings.py                       |   58 +-
 pandas/tests/test_take.py                          |    2 +-
 pandas/tests/tools/test_to_time.py                 |   15 +-
 pandas/tests/tseries/frequencies/test_freq_code.py |   61 +-
 pandas/tests/tseries/offsets/test_offsets.py       |   51 +-
 .../tseries/offsets/test_offsets_properties.py     |    5 +-
 pandas/tests/tseries/offsets/test_ticks.py         |   27 +-
 pandas/tests/tseries/offsets/test_yqm_offsets.py   |    1 +
 pandas/tests/tslibs/test_api.py                    |    5 +-
 pandas/tests/tslibs/test_conversion.py             |    7 +-
 pandas/tests/tslibs/test_normalize_date.py         |   41 -
 pandas/tests/tslibs/test_period_asfreq.py          |   13 +-
 pandas/tests/util/test_assert_series_equal.py      |   34 +-
 pandas/tests/window/common.py                      |  506 ++---
 pandas/tests/window/conftest.py                    |  215 ++
 pandas/tests/window/moments/conftest.py            |   58 +
 .../window/moments/test_moments_consistency_ewm.py |  279 +++
 .../moments/test_moments_consistency_expanding.py  |  497 +++++
 .../moments/test_moments_consistency_rolling.py    |  695 ++++++
 pandas/tests/window/moments/test_moments_ewm.py    |  661 ++----
 .../tests/window/moments/test_moments_expanding.py |  420 ----
 .../tests/window/moments/test_moments_rolling.py   | 2254 ++++++++------------
 pandas/tests/window/test_api.py                    |  565 ++---
 pandas/tests/window/test_apply.py                  |   30 +-
 pandas/tests/window/test_base_indexer.py           |   76 +-
 pandas/tests/window/test_ewm.py                    |   92 +-
 pandas/tests/window/test_expanding.py              |  264 ++-
 pandas/tests/window/test_rolling.py                |  892 +++++---
 pandas/tests/window/test_window.py                 |  126 +-
 pandas/tseries/frequencies.py                      |   16 +-
 pandas/tseries/offsets.py                          | 1025 ++-------
 pandas/util/_decorators.py                         |   12 +-
 pandas/util/_doctools.py                           |    2 +-
 pandas/util/_validators.py                         |    2 +-
 pyproject.toml                                     |    4 +-
 requirements-dev.txt                               |    4 +-
 scripts/validate_rst_title_capitalization.py       |   17 +
 setup.cfg                                          |    7 +-
 setup.py                                           |    8 +-
 web/pandas/community/blog/extension-arrays.md      |    2 +-
 web/pandas/getting_started.md                      |   16 +-
 web/pandas/static/css/pandas.css                   |    3 +
 504 files changed, 19269 insertions(+), 12424 deletions(-)
 create mode 100755 ci/build39.sh
 create mode 100644 ci/deps/travis-37-arm64.yaml
 create mode 100644 pandas/_libs/tslibs/base.pxd
 create mode 100644 pandas/_libs/tslibs/base.pyx
 delete mode 100644 pandas/_libs/tslibs/c_timestamp.pxd
 delete mode 100644 pandas/_libs/tslibs/c_timestamp.pyx
 create mode 100644 pandas/_libs/tslibs/period.pxd
 create mode 100644 pandas/core/arrays/_mixins.py
 create mode 100644 pandas/core/ops/blockwise.py
 create mode 100644 pandas/core/tools/times.py
 create mode 100644 pandas/tests/arrays/integer/test_concat.py
 create mode 100644 pandas/tests/frame/methods/test_astype.py
 create mode 100644 pandas/tests/frame/methods/test_set_index.py
 create mode 100644 pandas/tests/groupby/aggregate/test_numba.py
 create mode 100644 pandas/tests/groupby/test_groupby_dropna.py
 create mode 100644 pandas/tests/groupby/test_groupby_subclass.py
 create mode 100644 pandas/tests/groupby/test_nunique.py
 create mode 100644 pandas/tests/groupby/test_pipe.py
 create mode 100644 pandas/tests/groupby/test_quantile.py
 create mode 100644 pandas/tests/groupby/test_size.py
 create mode 100644 pandas/tests/indexes/categorical/test_astype.py
 create mode 100644 pandas/tests/indexes/datetimes/test_map.py
 create mode 100644 pandas/tests/indexes/datetimes/test_pickle.py
 create mode 100644 pandas/tests/indexes/numeric/test_astype.py
 create mode 100644 pandas/tests/indexes/period/test_factorize.py
 create mode 100644 pandas/tests/indexes/timedeltas/test_searchsorted.py
 create mode 100644 pandas/tests/io/data/stata/stata-compat-105.dta
 create mode 100644 pandas/tests/io/data/stata/stata-compat-108.dta
 create mode 100644 pandas/tests/io/data/stata/stata-compat-111.dta
 create mode 100644 pandas/tests/io/data/stata/stata-compat-113.dta
 create mode 100644 pandas/tests/io/data/stata/stata-compat-114.dta
 create mode 100644 pandas/tests/io/data/stata/stata-compat-118.dta
 create mode 100644 pandas/tests/resample/test_deprecated.py
 create mode 100644 pandas/tests/scalar/interval/test_arithmetic.py
 create mode 100644 pandas/tests/series/methods/test_astype.py
 delete mode 100644 pandas/tests/tslibs/test_normalize_date.py
 create mode 100644 pandas/tests/window/moments/test_moments_consistency_ewm.py
 create mode 100644 pandas/tests/window/moments/test_moments_consistency_expanding.py
 create mode 100644 pandas/tests/window/moments/test_moments_consistency_rolling.py
 delete mode 100644 pandas/tests/window/moments/test_moments_expanding.py

Joey@zenbook MINGW64 ~/pandas-joooeey (master)
$ git push
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/joooeey/pandas.git
   837daf18d..23c7e85d8  master -> master

After that, import pandas still results in the same C extension error as given above.

The only thing I left untouched was the Visual Studio Build Tools 2019.

I have the following build tools installed/missing:

Installation details

MSBuild Tools
Provides the tools required to build MSBuild-based applications.


C++ build tools

Included

  • C++ Build Tools core features

  • C++ 2019 Redistributable Update

Optional

  • MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.25)

  • Windows 10 SDK (10.0.18362.0)

  • C++ CMake tools for Windows

  • Testing tools core features - Build Tools

  • C++ AddressSanitizer (Experimental)

  • C++ ATL for latest v142 build tools (x86 & x64)

  • C++ MFC for latest v142 build tools (x86 & x64)

  • C++/CLI support for v142 build tools (14.25)

  • C++ Modules for v142 build tools (x64/x86 – experimental)

  • C++ Clang tools for Windows (9.0.0 - x64/x86)

  • Windows 10 SDK (10.0.17763.0)

  • Windows 10 SDK (10.0.17134.0)

  • Windows 10 SDK (10.0.16299.0)

  • MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)

  • MSVC v140 - VS 2015 C++ build tools (v14.00)

Problem description

import pandas fails on my master branch:

import pandas
Traceback (most recent call last):

  File "C:\Users\Joey\pandas-joooeey\pandas\__init__.py", line 32, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib

  File "C:\Users\Joey\pandas-joooeey\pandas\_libs\__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval

ModuleNotFoundError: No module named 'pandas._libs.interval'


The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "<ipython-input-1-38d4b0363d82>", line 1, in <module>
    import pandas

  File "C:\Users\Joey\pandas-joooeey\pandas\__init__.py", line 40, in <module>
    ) from e

ImportError: C extension: No module named 'pandas._libs.interval' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

Output of pd.show_versions()

N/A -- cannot even import Pandas.

The fork from pandas-dev was made in April 2020.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions