1078774751@qq.com

  • 内容:跟换pip镜像源和升级pip版本都试过了

  • 内容:终端可以正常安装django: huzhuo@huzhuodeMacBook-Pro ~ % pip3 install django WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: django in ./Library/Python/3.8/lib/python/site-packages (3.2) Requirement already satisfied: asgiref<4,>=3.3.2 in ./Library/Python/3.8/lib/python/site-packages (from django) (3.5.2) Requirement already satisfied: sqlparse>=0.2.2 in ./Library/Python/3.8/lib/python/site-packages (from django) (0.4.2) Requirement already satisfied: pytz in ./Library/Python/3.8/lib/python/site-packages (from django) (2022.2.1) huzhuo@huzhuodeMacBook-Pro ~ % pycharm自动生成的虚拟环境安装不了: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/huzhuo/git/test/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -c lib/zoneinfo_module.c -o build/temp.macosx-10.14.6-arm64-cpython-38/lib/zoneinfo_module.o -std=c99 lib/zoneinfo_module.c:1:10: fatal error: 'Python.h' file not found #include "Python.h" ^~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for backports.zoneinfo Failed to build backports.zoneinfo ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects (venv) huzhuo@huzhuodeMacBook-Pro test %