<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dmPython &#8211; 良的世界</title>
	<atom:link href="https://www.lemonary.cn/tag/dmpython/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lemonary.cn</link>
	<description></description>
	<lastBuildDate>Tue, 24 Mar 2026 05:01:31 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.lemonary.cn/wp-content/uploads/2024/12/profile-150x150.jpg</url>
	<title>dmPython &#8211; 良的世界</title>
	<link>https://www.lemonary.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Windows环境安装dmPython时报错：error: Microsoft Visual C++ 14.0 or greater is required.</title>
		<link>https://www.lemonary.cn/windows%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85dmpython%e6%97%b6%e6%8a%a5%e9%94%99%ef%bc%9aerror-microsoft-visual-c-14-0-or-greater-is-required/</link>
					<comments>https://www.lemonary.cn/windows%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85dmpython%e6%97%b6%e6%8a%a5%e9%94%99%ef%bc%9aerror-microsoft-visual-c-14-0-or-greater-is-required/#respond</comments>
		
		<dc:creator><![CDATA[shine]]></dc:creator>
		<pubDate>Wed, 25 Feb 2026 07:12:37 +0000</pubDate>
				<category><![CDATA[DM]]></category>
		<category><![CDATA[dmPython]]></category>
		<guid isPermaLink="false">https://www.lemonary.cn/?p=2656</guid>

					<description><![CDATA[一、问题概述 当使用内网Windows环境安装dmPython时由于环境中没有Microsoft Visual [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">一、问题概述</h2>



<p class="wp-block-paragraph">当使用内网Windows环境安装dmPython时由于环境中没有Microsoft Visual C++ 14.0导致报错。</p>



<pre class="wp-block-code"><code>error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/</code></pre>



<h2 class="wp-block-heading">二、问题分析</h2>



<p class="wp-block-paragraph">利用有网络的Windows服务器安装同版本Python，对dmPython源码进行编译，生成whl文件。再将whl文件拿到离线环境进行安装。</p>



<h2 class="wp-block-heading">三、解决步骤</h2>



<h3 class="wp-block-heading">3.1 安装同版本Python</h3>



<p class="wp-block-paragraph"><a href="https://www.python.org/downloads" target="_blank" rel="noopener">https://www.python.org/downloads</a></p>



<h3 class="wp-block-heading">3.2 下载dmPython源码</h3>



<p class="wp-block-paragraph">官网下载地址：<a href="https://www.dameng.com/download/index.html" target="_blank" rel="noopener">https://www.dameng.com/download/index.html</a></p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="525" src="https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-1024x525.png" alt="" class="wp-image-2667" srcset="https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-1024x525.png 1024w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-300x154.png 300w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-768x394.png 768w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-1536x788.png 1536w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-21-2048x1050.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">或直接访问：<a href="https://gitee.com/DamengDB/dmPython" target="_blank" rel="noopener">https://gitee.com/DamengDB/dmPython</a></p>



<h3 class="wp-block-heading">3.3 编译生成whl文件</h3>



<pre class="wp-block-code"><code>PS C:\dmPython-main&gt; python setup.py bdist_wheel</code></pre>



<p class="wp-block-paragraph">whl文件位于dmPython-main\dist目录下</p>



<figure class="wp-block-image size-full"><img decoding="async" width="660" height="56" src="https://www.lemonary.cn/wp-content/uploads/2026/02/image-18.png" alt="" class="wp-image-2660" srcset="https://www.lemonary.cn/wp-content/uploads/2026/02/image-18.png 660w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-18-300x25.png 300w" sizes="(max-width: 660px) 100vw, 660px" /></figure>



<p class="wp-block-paragraph">报错的话可能是没有安装模块</p>



<p class="wp-block-paragraph">python -m pip install &#8211;upgrade wheel setuptools</p>



<h3 class="wp-block-heading">3.4 将whl文件在离线环境安装</h3>



<pre class="wp-block-code"><code>PS C:\dmPython-main\dist&gt; pip install .\dmpython-2.5.26-cp313-cp313-win_amd64.whl</code></pre>



<figure class="wp-block-image size-full"><img decoding="async" width="975" height="162" src="https://www.lemonary.cn/wp-content/uploads/2026/02/image-20.png" alt="" class="wp-image-2662" srcset="https://www.lemonary.cn/wp-content/uploads/2026/02/image-20.png 975w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-20-300x50.png 300w, https://www.lemonary.cn/wp-content/uploads/2026/02/image-20-768x128.png 768w" sizes="(max-width: 975px) 100vw, 975px" /></figure>



<h3 class="wp-block-heading">3.5 编写程序进行测试</h3>



<pre class="wp-block-code"><code>import dmPython
conn=dmPython.connect(user='SYSDBA',password='SYSDBA',server= '192.168.10.10',port=5236)
cursor = conn.cursor()
cursor.execute('select username from dba_users')
values = cursor.fetchall()
print(values)
cursor.close()
conn.close()</code></pre>



<h2 class="wp-block-heading">四、其他思路</h2>



<p class="wp-block-paragraph">从可以联网的机器上制作离线包，然后传输到离线环境进行安装Microsoft Visual C++以解决报错问题。</p>



<h3 class="wp-block-heading">4.1 联网机器获取 vs_buildtools.exe</h3>



<p class="wp-block-paragraph">下载地址：<a href="https://aka.ms/vs/17/release/vs_BuildTools.exe" target="_blank" rel="noopener">https://aka.ms/vs/17/release/vs_BuildTools.exe</a></p>



<h3 class="wp-block-heading">4.2 联网机器制作离线包</h3>



<p class="wp-block-paragraph">打开命令行（cmd或PowerShell），导航到 vs_buildtools.exe 所在的目录，执行以下命令来下载完整的离线安装文件。</p>



<pre class="wp-block-code"><code>PS C:\Downloads&gt; .\vs_BuildTools.exe --layout C:\vs2022_offline --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --lang zh-CN</code></pre>



<p class="wp-block-paragraph"><code>--layout C:\vs2022_offline</code>指定将完整的离线安装包下载到本地的 C:\vs2022_offline 文件夹，下载完成后，将整个 C:\vs2022_offline 文件夹（确保包含所有文件）拷贝到你的离线目标机上。</p>



<h3 class="wp-block-heading">4.3 离线机器上安装</h3>



<p class="wp-block-paragraph">在离线机上，<strong>以管理员身份</strong>打开 PowerShell，进入离线包目录，然后运行</p>



<pre class="wp-block-code"><code>PS C:\vs2022_offline&gt; .\vs_setup.exe --noweb --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lemonary.cn/windows%e7%8e%af%e5%a2%83%e5%ae%89%e8%a3%85dmpython%e6%97%b6%e6%8a%a5%e9%94%99%ef%bc%9aerror-microsoft-visual-c-14-0-or-greater-is-required/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
