原因可能是因为setuptools升级版本过高,把setuptools降级到44.0.0及以下即可。
pip uninstall setuptools
pip install setuptools==44.0.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

当前文章被以下社区和专栏收录:
文章指出,如果遇到因setuptools版本过高导致的问题,可以将setuptools降级到44.0.0或以下版本,例如使用命令`pipuninstallsetuptools`和`pipinstallsetuptools==44.0.0`来完成操作。这个解决方案适用于依赖管理或Python环境冲突的场景。
原因可能是因为setuptools升级版本过高,把setuptools降级到44.0.0及以下即可。
pip uninstall setuptools
pip install setuptools==44.0.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

解决pyinstaller exe报错:ModuleNotFoundError: No module named ‘pkg_resources.py2_warn‘
成功解决错误 where python 进入到安装目录中,找到安装目录下的Lib\site-packages\pkg_resources\ __init__.py 打开__init__.py,定位至86行,注释掉,保存 使用pyinstaller重新对py文件进行exe打包,再次打开exe时程序正常运行,错误消失。 ...
解决ModuleNotFoundError: No module named ‘pkg_resources‘
今天使用pacman -Syuu升级了一下msys2的MinGW64,结果出现了Python不能正常使用的情况,升级之前都还好好的,现在出现import找不到包。想使用pip查看安装的包的情况,如果报错: ModuleNotFoundError: No module named ‘pkg_resources’ # pip Traceback (most recent call last): File "G:\msys64\mingw64\bin\pip-script.py", line 6, in &l
汇川伺服Modbus-RTU通讯实战:从帧结构解析到西门子PLC配置
本文详细解析了汇川伺服与西门子PLC通过Modbus-RTU协议进行通讯的实战步骤,包括帧结构解析、硬件连接、参数设置及PLC程序配置。通过具体案例和常见问题排查指南,帮助工程师快速掌握工业自动化中的通讯技术,提升设备调试效率。
ModuleNotFoundError: No module named ‘pkg_resources‘ 问题如何解决?
打开你的命令行工具,并确保你的虚拟环境已被激活。然后运行以下命令来安装或更新。包的一部分,用于处理 Python 包的发行和资源。这将列出所有已安装的 Python 包,包括。安装完成后,你可以通过运行以下命令来检查。通常是因为 Python 环境中缺少。如果你的项目依赖于特定版本的。,请确保安装了正确的版本。
ISP调试工程师相关面试问题_001
Qualcomm、MTK等ISP pipeline的框架原理及算法原理,还有调试经验。
Keystone变换(4)MATLAB仿真
关于Keystone变换三种方法(DFT-IFFT法、Sinc插值法和Chirp-Z法)的仿真
解决ModuleNotFoundError: No module named ‘pkg_resources‘问题
之前还正常的,今天构建项目运行报错:ModuleNotFoundError: No module named 'pkg_resources'。折腾了老半天,特此记录下#在尝试了AI、网上的多种方法均失效,最终发现重装指定版本的setuptools可以解决问题,我这里指定的是,其他版本应该也可以。同样的python版本、同样的模块,有时就会出现模块不兼容的情况,可以尝试降低或者升级相关模块的版本。我的python的版本是3.9.4,使用了pykafka2.8.0。
【ROS2实体机械臂驱动】封装珞石ROS2驱动库ros2_rokae_driver_lib
这一篇文章将封装为,和之前一篇文章《ROS2 编译、打包、封装三方库(Knet为例)_ros插件编译成静态库-优快云博客》写的封装,区别在于优化了cmake dependencies和include等属性和宏定义,同时对于多库内部依赖的情况做了特定处理,更加方便外部调用。其中珞石的编译参考博主之前的文章rokae xCoreSDK C++测试使用,这里不再做赘述。通过这篇文章对于如何打包机械臂厂家提供的三方库做了进一步说明,方便用于不同机械臂厂家的三方库封装调用。!!
Python使用pip安装报错ModuleNotFoundError: No module named ‘pkg_resources‘的解决方法
Python使用pip安装报错ModuleNotFoundError: No module named 'pkg_resources’的解决方法 大家好,我叫亓官劼(qí guān jié ),在优快云中记录学习的点滴历程,时光荏苒,未来可期,加油~博客地址为:亓官劼的博客 本文原创为亓官劼,请大家支持原创,部分平台一直在盗取博主的文章!!! 博主目前仅在优快云中写博客,唯一博客更新...
基于深度学习的茶叶等级检测识别系统:YOLOv10 + UI界面 + 数据集
YOLOv10是YOLO系列的最新版本,继承了YOLO模型的优点,并对速度和精度进行了优化。YOLOv10在目标检测中使用卷积神经网络(CNN)作为基础,通过改进网络结构和优化训练策略,实现了在更低的延迟下进行高精度的目标检测。本文详细介绍了基于YOLOv10的茶叶等级检测与识别系统的设计与实现过程。我们从数据集准备、模型训练与推理、UI界面设计等多个方面进行了详细讲解,并给出了相应的代码实现。通过本系统,我们可以高效地自动检测茶叶的等级,并通过UI界面直观地展示结果。
使用verilog设计实现QR分解
QR(正交三角)分解法是求一般矩阵全部特征值的最有效并广泛应用的方法,一般矩阵先经过正交相似变化成为Hessenberg矩阵,然后再应用QR方法求特征值和特征向量。 使用verilog对QR实现方法进行设计并进行功能仿真: 如下: 顶层模块代码: module TOP( H1R, H1I, H2R, H2I, H3R, H3I, H4R, H4I, clk, rst_n, Y1R, Y1I, Y2R, Y2I, X1R, X1I, X2R, X2I ); parameter width = 16; // I
解决 Python 报错:ModuleNotFoundError: No module named ‘pkg_resources‘
遇到ModuleNotFoundError: No module named 'pkg_resources'错误时,不要升级setuptools,而是需要将其降级到82.0.0以下版本。这是因为setuptools 82.0.0及以上版本彻底移除了pkg_resources模块,而许多旧版第三方库仍依赖该模块。解决方法很简单:执行pip install "setuptools<82"降级后即可恢复功能。该问题反映了Python生态中底层依赖破坏性更新带来的兼容性问题。
【知识图谱】实践篇——基于知识图谱的《红楼梦》人物关系可视化及问答系统实践:part1项目介绍与环境准备
看到这篇文章的你,相信对知识图谱相关概念不在陌生。知识图谱相关内容在实际开发中包含两个部分:1.知识图谱构建,2.知识图谱使用。知识图谱构建过程中涉及内容、技术都比较多。知识图谱的应用也逐渐在我们的生活中随处可见,其中基于知识图谱的问答系统就是其中的一个应用。基于知识图谱的问答系统称做KGQA(knowledge graph question answer),也有人称其为KBQA(knowledge based question answ).基于知识图谱的问答系统通常是使用的是领域知识图谱。下面就结合Git
解决 Python 报错:ModuleNotFoundError: No module named ‘pkg_resources’
Python开发中常见的"ModuleNotFoundError: No module named 'pkg_resources'"错误通常与setuptools缺失或环境配置不当有关。该错误可能出现在运行第三方项目、执行pip命令或使用虚拟环境时,主要原因包括:setuptools未安装、安装到错误环境、虚拟环境损坏或多Python版本冲突。解决方法包括:使用"python -m pip install setuptools"确保正确安装;检查Python和pip路
stop pin/ignore pin/exclude pin/float pin
stop pin、ignore pin、exclude pin、float pin的区别
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
ComfyUI 更新后 ModuleNotFoundError: No module named ‘pkg_resources‘报错修复指南
摘要: ComfyUI更新后出现ModuleNotFoundError: No module named 'pkg_resources'报错,原因是setuptools 82.0.0移除了该模块。修复方法:降级setuptools至77.0.3或81.0.0版本(pip install setuptools==77.0.3)。长期建议在项目中固定setuptools版本(如<82),并逐步迁移代码至importlib.resources等替代方案。此问题源于setuptools官方弃用pkg_reso
SAP B1中文培訓教材_SDK
公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说
CosyVoice环境安装报错:安装openai-whisper时出现ModuleNotFoundError: No module named ‘pkg_resources‘的原因
问题原因解决方案构建隔离环境中没有 setuptools,但setup.py在模块级别导入 pkg_resources1. ✅跳过隔离环境2. 修改setup.py延迟导入 pkg_resources你使用的是完全正确的临时解决方案。对于长期使用,可以考虑向项目提交 PR 修改setup.py,使其构建时不需要预先存在的 setuptools。
C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片
基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正
OV9734 DATASHEET,完整规格书
OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等
【已解决】python安装clip包时报错: ModuleNotFoundError: No module named ‘pkg_resources‘
文章摘要:安装CLIP包时出现构建错误,报错显示临时隔离环境中缺少pkg_resources模块,尽管本地环境已安装。原因是pip默认创建纯净的临时构建环境,不继承现有依赖。通过添加--no-build-isolation参数禁用隔离构建,直接使用当前环境依赖解决问题。该方法避免了临时环境缺失依赖导致的构建失败,成功完成安装。
dirsearch使用报错ModuleNotFoundError: No module named ‘pkg_resources‘
ModuleNotFoundError: No module named 'pkg_resources'表示Python环境中缺少名为pkg_resources的模块
【已解决】ModuleNotFoundError: No module named ‘pkg_resources‘
【已解决】ModuleNotFoundError: No module named 'pkg_resources'
【已解决】ModuleNotFoundError: No module named ‘pkg_resources‘ | Setuptools 82.0.0+ 版本断层深度复盘
【摘要】Setuptools 82.0.0+版本移除了pkg_resources模块,导致众多依赖该模块的AI框架(如ModelScope、FunASR)运行时报错。问题根源在于:1)Setuptools激进变更模块结构;2)开发者习惯性升级至最新版;3)下游生态迁移滞后。解决方案:1)推荐强制降级至81.0.0版本(pip install "setuptools<82.0.0" --force-reinstall);2)临时修改项目源码替换导入方式。建议生产环境中锁定setupt
2150
1万+

被折叠的 条评论
为什么被折叠?



