活动介绍
file-type

Windows下安装PyCharm的完全指南

ZIP文件

下载需积分: 50 | 4KB | 更新于2025-08-14 | 55 浏览量 | 0 下载量 举报 收藏
download 立即下载
根据给定的文件信息,本文将详细介绍如何在Windows操作系统中安装PyCharm的社区版本。首先,让我们梳理一下PyCharm的相关知识点和安装过程中需要注意的步骤。 ### PyCharm简介 PyCharm是由JetBrains公司开发的一个集成开发环境(IDE),主要用于Python语言的开发。作为一个专业化的开发工具,PyCharm集成了代码编辑、调试、测试、项目管理等多种功能,旨在提升Python开发的效率。 ### 安装PyCharm社区版本的重要性 PyCharm社区版本是免费的,它提供了PyCharm专业版的核心功能,对于一般的开发需求来说已经足够使用。选择社区版本可以在不影响功能的情况下,节约开发成本。另外,由于它是开源的,社区版也得到了广泛的关注和贡献,其质量与专业版相当。 ### 安装PyCharm的步骤 1. **准备工作**: - 确认Windows系统版本,PyCharm通常支持主流的Windows系统,包括Windows 7、8、10等。 - 确保系统中没有其他版本的Python环境,如果有,需要妥善处理,以避免版本冲突。 - 访问PyCharm的官方下载页面(https://www.jetbrains.com/pycharm/download/),下载适合您系统的社区版本安装程序。 2. **安装过程**: - 找到下载的安装程序,通常是一个.exe文件。 - 双击运行安装程序,如果系统弹出安全警告,选择继续。 - 按照安装向导的提示进行安装,接受许可协议,并选择安装路径。 - 安装向导会询问您是否需要添加环境变量,建议选择添加,以便在命令行中使用PyCharm。 - 安装向导还允许您选择安装组件,例如是否安装Python解释器、调试器等,根据您的需求选择。 - 最后,完成安装过程,并启动PyCharm。 3. **创建新项目**: - 打开PyCharm后,可以选择创建一个新的项目,或者打开一个已有的项目。 - 创建新项目时,需要指定项目的位置、使用的Python解释器(通常建议使用系统自带的或者虚拟环境中配置的)。 - 可以选择是否创建初始文件,例如main.py。 ### 注意事项 - 在安装PyCharm之前,建议关闭所有正在运行的程序,以避免安装过程中出现冲突。 - 如果是在公司或学校的网络环境下安装PyCharm,可能需要联系网络管理员获取权限。 - PyCharm社区版本与专业版的主要区别在于专业版提供了Web开发工具、数据库和科学工具包等额外功能,如果需要这些功能,应选择安装专业版。 - 安装完成后,建议更新PyCharm到最新版本,以便获得最新的功能和修复。 - PyCharm的配置和优化是一个持续的过程,根据个人习惯和项目需求,可以对PyCharm的设置进行调整。 ### 总结 安装PyCharm社区版本是一个简单且直接的过程。对于希望进行Python开发但不希望立即投入过多资源的用户来说,是一个理想的选择。通过本文的介绍,用户应该能够顺利地完成PyCharm的安装,并开始他们的Python项目开发之旅。

相关推荐

filetype

PyCharm INSTALLATION INSTRUCTIONS =============================================================================== 1. Unpack the PyCharm distribution archive that you downloaded where you wish to install the program. We will refer to this location as your {installation home}. 2. To start the application, open a console, cd into "{installation home}/bin" and type: ./pycharm.sh This will initialize various configuration files in the configuration directory: ~/.config/JetBrains/PyCharm2023.3. 3. [OPTIONAL] Add "{installation home}/bin" to your PATH environment variable so that you can start PyCharm from any directory. 4. [OPTIONAL] To adjust the value of the JVM heap size, create a file pycharm.vmoptions (or pycharm64.vmoptions if using a 64-bit JDK) in the configuration directory and set the -Xms and -Xmx parameters. To see how to do this, you can reference the vmoptions file under "{installation home}/bin" as a model but do not modify it, add your options to the new file. [OPTIONAL] Change the location of the "config" and "system" directories ------------------------------------------------------------------------------ By default, PyCharm stores all your settings in the ~/.config/JetBrains/PyCharm2023.3 directory and uses ~/.local/share/JetBrains/PyCharm2023.3 as a data cache. To change the location of these directories: 1. Open a console and cd into ~/.config/JetBrains/PyCharm2023.3 2. Create a file idea.properties and set the idea.system.path and idea.config.path variables, for example: idea.system.path=~/custom/system idea.config.path=~/custom/config NOTE: Store the data cache ("system" directory) on a disk with at least 1 GB of free space. Enjoy! -PyCharm Development Team

filetype

D:\PythonProject\.venv1\Scripts\python.exe D:\PythonProject\2.py False ===================================BUG REPORT=================================== ================================================================================ The following directories listed in your path were found to be non-existent: {WindowsPath('/PythonProject/ms-swift;D'), WindowsPath('D'), WindowsPath('/pycharm/PyCharm 2024.3.4/plugins/python-ce/helpers/pycharm_matplotlib_backend;D'), WindowsPath('/pycharm/PyCharm 2024.3.4/plugins/python-ce/helpers/pycharm_plotly_backend;D'), WindowsPath('/PythonProject;D')} The following directories listed in your path were found to be non-existent: {WindowsPath('//by.jkd360.com//'), WindowsPath('http')} CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths... The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')} DEBUG: Possible options found for libcudart.so: set() CUDA SETUP: PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: 6.1. CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md CUDA SETUP: Loading binary D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118_nocublaslt.so... argument of type 'WindowsPath' is not iterable CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected. CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA. CUDA SETUP: Solution 2a): Download CUDA install script: wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/cuda_install.sh CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO. CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\cuda_setup\main.py:167: UserWarning: Welcome to bitsandbytes. For bug reports, please run python -m bitsandbytes warn(msg) D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\cuda_setup\main.py:167: UserWarning: WARNING: Compute capability < 7.5 detected! Only slow 8-bit matmul is supported for your GPU! If you run into issues with 8-bit matmul, you can try 4-bit quantization: https://huggingface.co/blog/4bit-transformers-bitsandbytes warn(msg) Traceback (most recent call last): File "D:\PythonProject\2.py", line 2, in <module> import bitsandbytes File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\__init__.py", line 6, in <module> from . import cuda_setup, utils, research File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\research\__init__.py", line 1, in <module> from . import nn File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\research\nn\__init__.py", line 1, in <module> from .modules import LinearFP8Mixed, LinearFP8Global File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in <module> from bitsandbytes.optim import GlobalOptimManager File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\optim\__init__.py", line 6, in <module> from bitsandbytes.cextension import COMPILED_WITH_CUDA File "D:\PythonProject\.venv1\lib\site-packages\bitsandbytes\cextension.py", line 20, in <module> raise RuntimeError(''' RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information: python -m bitsandbytes Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

filetype

再pycharm安装sklearn时出现Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting sklearn Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7a/93/e0e1b1e98f39dfca7ec9795cb46f6e09e88a2fd5d4a28e4b3d1f618a2aec/sklearn-0.0.post5.tar.gz (3.7 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' error: subprocess-exited-with-error python setup.py egg_info did not run successfully. exit code: 1 [18 lines of output] The 'sklearn' PyPI package is deprecated, use 'scikit-learn' rather than 'sklearn' for pip commands. Here is how to fix this error in the main use cases: - use 'pip install scikit-learn' rather than 'pip install sklearn' - replace 'sklearn' by 'scikit-learn' in your pip requirements files (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...) - if the 'sklearn' package is used by one of your dependencies, it would be great if you take some time to track which package uses 'sklearn' instead of 'scikit-learn' and report it to their issue tracker - as a last resort, set the environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error More information is available at https://github.com/scikit-learn/sklearn-pypi-package If the previous advice does not cover your use case, feel free to report it at https://github.com/scikit-learn/sklearn-pypi-package/issues/new [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.是什么问题?该怎样解决?如何安装sklearn库?

filetype

(venv) E:\pycharm\study\dorm_face_recognition\model_training>pip install dlib Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/f4/f8949b18ec1df2ef05fc2ea1d1dd82ff2d050b8704b7d0d088017315c221/dlib-20.0.0.tar.gz (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 6.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: dlib Building wheel for dlib (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for dlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [48 lines of output] running bdist_wheel running build running build_ext Traceback (most recent call last): File "E:\python3.9.13\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "E:\python3.9.13\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "E:\pycharm\study\venv\Scripts\cmake.exe\__main__.py", line 4, in <module> ModuleNotFoundError: No module named 'cmake' ================================================================================ ================================================================================ ================================================================================ CMake is not installed on your system! Or it is possible some broken copy of cmake is installed on your system. It is unfortunately very common for python package managers to include broken copies of cmake. So if the error above this refers to some file path to a cmake file inside a python or anaconda or miniconda path then you should delete that broken copy of cmake from your computer. Instead, please get an official copy of cmake from one of these known good sources of an official cmake: - cmake.org (this is how windows users should get cmake) - apt install cmake (for Ubuntu or Debian based systems) - yum install cmake (for Redhat or CenOS based systems) On a linux machine you can run `which cmake` to see what cmake you are actually using. If it tells you it's some cmake from any kind of python packager delete it and install an official cmake. More generally, cmake is not installed if when you open a terminal window and type cmake --version you get an error. So you can use that as a very basic test to see if you have cmake installed. That is, if cmake --version doesn't run from the same terminal window from which you are reading this error message, then you have not installed cmake. Windows users should take note that they need to tell the cmake installer to add cmake to their PATH. Since you can't run commands that are not in your PATH. This is how the PATH works on Linux as well, but failing to add cmake to the PATH is a particularly common problem on windows and rarely a problem on Linux. ================================================================================ ================================================================================ ================================================================================ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects

filetype

cessfully installed Mastodon.py-2.0.1 blurhash-1.1.4 boost-0.1 certifi-2025.4.26 charset_normalizer-3.4.2 decorator-5.2.1 greenlet-3.2.3 idna-3.10 python-dateutil-2.9.0.post0 python-magic-bin-0.4.14 requests-2.32.4 six-1.17.0 sqlalchemy-2.0.41 typing-extensions-4.14.0 urllib3-2.4.0 [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW> pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/f4/f8949b18ec1df2ef05fc2ea1d1dd82ff2d050b8704b7d0d088017315c221/dlib-20.0.0.tar.gz (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 4.9 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: dlib Building wheel for dlib (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for dlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [48 lines of output] running bdist_wheel running build running build_ext Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\OCR\AW\.venv1\Scripts\cmake.exe\__main__.py", line 4, in <module> ModuleNotFoundError: No module named 'cmake' ================================================================================ ================================================================================ ================================================================================ CMake is not installed on your system! Or it is possible some broken copy of cmake is installed on your system. It is unfortunately very common for python package managers to include broken copies of cmake. So if the error above this refers to some file path to a cmake file inside a python or anaconda or miniconda path then you should delete that broken copy of cmake from your computer. Instead, please get an official copy of cmake from one of these known good sources of an official cmake: - cmake.org (this is how windows users should get cmake) - apt install cmake (for Ubuntu or Debian based systems) - yum install cmake (for Redhat or CenOS based systems) On a linux machine you can run `which cmake` to see what cmake you are actually using. If it tells you it's some cmake from any kind of python packager delete it and install an official cmake. More generally, cmake is not installed if when you open a terminal window and type cmake --version you get an error. So you can use that as a very basic test to see if you have cmake installed. That is, if cmake --version doesn't run from the same terminal window from which you are reading this error message, then you have not installed cmake. Windows users should take note that they need to tell the cmake installer to add cmake to their PATH. Since you can't run commands that are not in your PATH. This is how the PATH works on Linux as well, but failing to add cmake to the PATH is a particularly common problem on windows and rarely a problem on Linux. ================================================================================ ================================================================================ ================================================================================ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW> import sys import : 无法将“import”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + import sys + ~~~~~~ + CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException (.venv1) PS D:\OCR\AW> print(sys.executable) # 应显示自定义路径 sys.executable : 无法将“sys.executable”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 7 + print(sys.executable) # 应显示自定义路径 + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (sys.executable:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException (.venv1) PS D:\OCR\AW> pip uninstall cmake Found existing installation: cmake 4.0.2 Uninstalling cmake-4.0.2: Would remove: d:\ocr\aw\.venv1\lib\site-packages\cmake-4.0.2.dist-info\* d:\ocr\aw\.venv1\lib\site-packages\cmake\* d:\ocr\aw\.venv1\scripts\ccmake.exe d:\ocr\aw\.venv1\scripts\cmake.exe d:\ocr\aw\.venv1\scripts\cpack.exe d:\ocr\aw\.venv1\scripts\ctest.exe Proceed (Y/n)? cmake --version # 应显示 ≥3.5 的版本 Your response ('cmake --version # 应显示 ≥3.5 的版本') was not one of the expected responses: y, n, Proceed (Y/n)? Y Successfully uninstalled cmake-4.0.2 (.venv1) PS D:\OCR\AW> cmake --version # 应显示 ≥3.5 的版本 cmake version 4.0.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). (.venv1) PS D:\OCR\AW> $env:VSCMD_ARG_TGT_ARCH = 'x64' (.venv1) PS D:\OCR\AW> $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64" (.venv1) PS D:\OCR\AW> # 使用清华镜像安装 (.venv1) PS D:\OCR\AW> pip install dlib==19.24.0 -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib==19.24.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/3b/7a8522a5c2ef6ff6252e46b0788b3d2c2280198c49d6ecf3b576b171045f/dlib-19.24.0.tar.gz (3.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 6.0 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [60 lines of output] running bdist_wheel running build running build_py running build_ext C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(cmake_version) < '3.1.0': Building extension for Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\d lib_0adc76f556db44bd8f9f76c52f05b10a\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=D:\OCR\AW\.venv1\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\build\lib.win-amd64-cpython-39 -A x64' -- Building for: Visual Studio 17 2022 CMake Error at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 222, in <module> setup( File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\__init__.py", line 103, in setup return distutils.core.setup(**attrs) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup return run_commands(dist) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands dist.run_commands() File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands self.run_command(cmd) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "D:\OCR\AW\.venv1\lib\site-packages\wheel\bdist_wheel.py", line 364, in run self.run_command("build") File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run self.run_command(cmd_name) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 134, in run self.build_extension(ext) File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 171, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Admin\\AppD ata\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\OCR\\AW\\.venv1\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW> # 直接安装预编译的 whl 文件(需匹配 Python 版本) (.venv1) PS D:\OCR\AW> pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl Collecting dlib==19.24.0 ERROR: HTTP error 404 while getting https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl ERROR: Could not install requirement dlib==19.24.0 from https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl because of HTTP error 404 Clien t Error: Not Found for url: https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl for URL https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW>

filetype

Quit the server with CTRL-BREAK. WARNING: This is a development server. Do not use it in a production setting. Use a production WSGI or ASGI server instead. For more information on production servers see: https://docs.djangoproject.com/en/5.2/howto/deployment/ [06/Jun/2025 11:17:48] "GET / HTTP/1.1" 200 20945 Traceback (most recent call last): File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\core\handlers\base.py", line 181, in _get_response callback, callback_args, callback_kwargs = self.resolve_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\core\handlers\base.py", line 313, in resolve_request resolver_match = resolver.resolve(request.path_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\urls\resolvers.py", line 705, in resolve raise Resolver404({"tried": tried, "path": new_path}) django.urls.exceptions.Resolver404: {'tried': [[<URLResolver <URLPattern list> (admin:admin) 'admin/'>], [<URLResolver <module 'comment.urls' fro m 'E:\\pycharm\\One\\music_tl\\comment\\urls.py'> (None:None) 'comment/'>], [<URLResolver <module 'index.urls' from 'E:\\pycharm\\One\\music_tl\\ index\\urls.py'> (None:None) ''>, <URLPattern ''>], [<URLResolver <module 'play.urls' from 'E:\\pycharm\\One\\music_tl\\play\\urls.py'> (None:Non e) 'play/'>], [<URLResolver <module 'ranking.urls' from 'E:\\pycharm\\One\\music_tl\\ranking\\urls.py'> (None:None) 'ranking/'>], [<URLResolver < module 'search.urls' from 'E:\\pycharm\\One\\music_tl\\search\\urls.py'> (None:None) 'search/'>], [<URLResolver <module 'user.urls' from 'E:\\pycharm\\One\\music_tl\\user\\urls.py'> (None:None) 'user/'>], [<URLPattern '^static/(?P<path>.*)$' [name='static']>]], 'path': 'admin'} During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\defaulttags.py", line 1035, in find_library return parser.libraries[name] ~~~~~~~~~~~~~~~~^^^^^^ KeyError: 'staticfiles' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\core\handlers\exception.py", line 164, in get_exception_response response = callback(request, exception=exception) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\index\views.py", line 28, in page_not_found return render(request, 'error404.html', status=404) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\shortcuts.py", line 25, in render content = loader.render_to_string(template_name, context, request, using=using) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\loader.py", line 61, in render_to_string template = get_template(template_name, using=using) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\loader.py", line 15, in get_template return engine.get_template(template_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\backends\django.py", line 79, in get_template return Template(self.engine.get_template(template_name), self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\engine.py", line 177, in get_template template, origin = self.find_template(template_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\engine.py", line 159, in find_template template = loader.get_template(name, skip=skip) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\loaders\cached.py", line 57, in get_template template = super().get_template(template_name, skip) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\loaders\base.py", line 28, in get_template return Template( ^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\base.py", line 154, in __init__ self.nodelist = self.compile_nodelist() ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\base.py", line 196, in compile_nodelist nodelist = parser.parse() ^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\base.py", line 518, in parse raise self.error(token, e) File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\base.py", line 516, in parse compiled_result = compile_func(self, token) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\defaulttags.py", line 1097, in load lib = find_library(parser, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\One\music_tl\.venv\Lib\site-packages\django\template\defaulttags.py", line 1037, in find_library raise TemplateSyntaxError( django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library. Must be one of:

人间发财树
  • 粉丝: 40
上传资源 快速赚钱