7-21 Hashing(25 分)

本文介绍了一种使用哈希表存储唯一正整数的方法,并通过二次探测解决冲突。当用户定义的表大小不是素数时,会自动调整为下一个素数。文章详细展示了如何创建哈希表、判断素数、插入数据以及处理无法插入的情况。
7-21 Hashing(25 分)

The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be H(key)=key%TSize where TSize is the maximum size of the hash table. Quadratic probing (with positive increments only) is used to solve the collisions.

Note that the table size is better to be prime. If the maximum size given by the user is not prime, you must re-define the table size to be the smallest prime number which is larger than the size given by the user.

Input Specification:

Each input file contains one test case. For each case, the first line contains two positive numbers: MSize (104) and N (MSize) which are the user-defined table size and the number of input numbers, respectively. Then N distinct positive integers are given in the next line. All the numbers in a line are separated by a space.

Output Specification:

For each test case, print the corresponding positions (index starts from 0) of the input numbers in one line. All the numbers in a line are separated by a space, and there must be no extra space at the end of the line. In case it is impossible to insert the number, print "-" instead.

Sample Input:

4 4
10 6 4 15

Sample Output:

0 1 4 -
code:
 
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct HTable{
    int *List;
    int Size;
};
typedef struct HTable* HashTable;
int prime[100000];
void is_Prime(){//筛选法求素数
    int i,j;
    for(i = 0; i < 100000; i++){
        prime[i] = 1;
    }
    prime[0] = prime[1] = 0;
    for(i = 2; i < 100000; i++){
        if(prime[i]){
            for(j = i+i; j < 100000; j += i){
                prime[j] = 0;
            }
        }
    }
}
int NextPrime(int n){
   if(!prime[n]){//如果不是素数
      int i = n+1;
      while(!prime[i]){//一直加直到出现第一个素数
        i++;
      }
      return i;
   }
}

HashTable Creat(int n){
    HashTable H;//创建结构体并初始化
    int i;
    H = (HashTable)malloc(sizeof(struct HTable));
    H->Size = NextPrime(n);
    H->List = (int*)malloc(H->Size*sizeof(int));
    for(i = 0; i < H->Size; i++)
        H->List[i] = 0;
    return H;
}

int Insert(HashTable H,int num){
    int pos,i;
    pos = num % H->Size;
    for(i = 0; i <= H->Size && H->List[pos]; i++)//如果H->List[pos]这个点是0,则直接插入不执行循环,如果发现这个位置已经有了,则进行二次查找
        pos = (pos + 2*i + 1) % H->Size;
    if(i <= H->Size){//如果在哈希表大小范围内找到新位置,返回新位置
        H->List[pos] = 1;
        return pos;
    }
    else return -1;//如果在大小范围内找不着合适位置,返回-1
}

int main(){
    is_Prime();
    int i,m,n,num;//m是大小,n是所给元素个数,num是每次输入的元素
    int pos[10001];//记录哈希出来的位置
    HashTable H;
    scanf("%d%d",&m,&n);
    H = Creat(m);//创建一大小为m的哈希表
    for(i = 0; i < n; i++){
        scanf("%d",&num);
        pos[i] = Insert(H,num);//哈希
    }
    if(n){
        printf("%d",pos[0]);
        for(i = 1; i < n; i++){
            if(pos[i] == -1)printf(" -");//如果值是-1.输出-
            else printf(" %d",pos[i]);
        }
    }
    return 0;
}


pip install pandas Collecting pandas Using cached pandas-2.3.3.tar.gz (4.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [140 lines of output] + meson setup /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017 /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/.mesonpy-a8z07342 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/.mesonpy-a8z07342/meson-python-native-file.ini The Meson build system Version: 1.9.1 Source dir: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017 Build dir: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/.mesonpy-a8z07342 Build type: native build Project name: pandas Project version: 2.3.3 C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)") C linker for the host machine: cc ld.bfd 2.27-27 C++ compiler for the host machine: c++ (gcc 4.8.5 "c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)") C++ linker for the host machine: c++ ld.bfd 2.27-27 Cython compiler for the host machine: cython (cython 3.2.1) Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python found: YES (/root/miniconda/bin/python) Found pkg-config: YES (/usr/bin/pkg-config) 0.27.1 Run-time dependency python found: YES 3.9 Build targets in project: 53 pandas 2.3.3 User defined options Native files: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/.mesonpy-a8z07342/meson-python-native-file.ini b_ndebug : if-release b_vscrt : md buildtype : release vsenv : true Found ninja-1.13.0.git.kitware.jobserver-pipe-1 at /tmp/pip-build-env-im_h4qw4/normal/bin/ninja Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper: /tmp/pip-build-env-im_h4qw4/overlay/bin/meson compile -C . + /tmp/pip-build-env-im_h4qw4/normal/bin/ninja [1/151] Generating pandas/_libs/algos_common_helper_pxi with a custom command [2/151] Generating pandas/_libs/algos_take_helper_pxi with a custom command [3/151] Generating pandas/_libs/khash_primitive_helper_pxi with a custom command [4/151] Generating pandas/_libs/hashtable_class_helper_pxi with a custom command [5/151] Generating pandas/_libs/hashtable_func_helper_pxi with a custom command [6/151] Generating pandas/_libs/intervaltree_helper_pxi with a custom command [7/151] Generating pandas/_libs/index_class_helper_pxi with a custom command [8/151] Generating pandas/_libs/sparse_op_helper_pxi with a custom command [9/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/dtypes.pyx [10/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/base.pyx [11/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/ccalendar.pyx [12/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/conversion.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [13/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/nattype.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/nattype.pyx:79:0: Global name __nat_unpickle matched from within class scope in contradiction to Python 'class private name' rules. This may change in a future release. warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/nattype.pyx:79:0: Global name __nat_unpickle matched from within class scope in contradiction to Python 'class private name' rules. This may change in a future release. [14/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/fields.pyx [15/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/np_datetime.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [16/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/offsets.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [17/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/parsing.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [18/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/period.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [19/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/strptime.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [20/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/timezones.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [21/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/timedeltas.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [22/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/timestamps.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [23/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/tzconversion.pyx [24/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/vectorized.pyx [25/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/arrays.pyx [26/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/hashing.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [27/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/groupby.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [28/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/algos.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [29/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/indexing.pyx [30/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/index.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [31/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/internals.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [32/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/hashtable.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [33/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/lib.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [34/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/missing.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [35/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/interval.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [36/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/join.pyx [37/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/parsers.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/parsers.pyx:1605:18: noexcept clause is ignored for function returning Python object [38/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/ops.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [39/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/properties.pyx [40/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/ops_dispatch.pyx [41/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/sas.pyx [42/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/byteswap.pyx [43/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/reshape.pyx [44/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslib.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [45/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/testing.pyx warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:188:38: noexcept clause is ignored for function returning Python object warning: /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/tslibs/util.pxd:193:40: noexcept clause is ignored for function returning Python object [46/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/writers.pyx [47/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/sparse.pyx [48/151] Compiling C object pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o FAILED: [code=1] pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o cc -Ipandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p -Ipandas/_libs/tslibs -I../pandas/_libs/tslibs -I../../../pip-build-env-im_h4qw4/overlay/lib/python3.9/site-packages/numpy/_core/include -I../pandas/_libs/include -I/root/miniconda/include/python3.9 -fvisibility=hidden -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -DNPY_NO_DEPRECATED_API=0 -DNPY_TARGET_VERSION=NPY_1_21_API_VERSION -fPIC -MD -MQ pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o -MF pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o.d -o pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_tslibs_base.pyx.c.o -c pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c pandas/_libs/tslibs/base.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/base.pyx.c:1374:27: 致命错误:stdatomic.h:没有那个文件或目录 #include <stdatomic.h> ^ 编译中断。 [49/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/window/indexers.pyx [50/151] Compiling Cython source /tmp/pip-install-ncu8qdju/pandas_5fc9b3fbacee441fb42cc7e35f980017/pandas/_libs/window/aggregations.pyx ninja: build stopped: subcommand failed. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. 我在下载pandas 使用pip insatll pandas命令
最新发布
11-27
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值