惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - 紫微星

ENVI遥感影像处理实用手册PDF下载 卡巴斯基许可Key需求登记表 ArcGIS Desktop 9.3 中文运行环境|中文补丁 胡适:赠与今年的大学毕业生 ArcMap打不开且出现提示(Hostname:Not_Set)的解决方法 QQ超级群问题反馈 “GIS空间分析-使用ArcGIS”课程资料完整打包下载,感谢杨克诚老师! ArcGIS 9.3 下载(包含ArcGIS Desktop、ArcGIS Engine、ArcGIS Server、ArcSDE、workstation) ArcGIS中查看metadata显示"warning+乱码"的解决方法 [请您去投票]ESRI中国社区2008年度优秀会员评选 [新年快乐!] Modeling Our World三版合集 下载[2009-4-27更新] ADO.NET入门学习备忘 GIS界首个超级QQ群——“GIS人@E家”,欢迎GIS朋友们加入! 深入研究VS2008中的JavaScript编辑调试器 AE初学的一点理解及有关QI(接口查询) 引用与using的什么区别 控件和组件的差别[转] 平时遇到的GISblog收集 平时遇到的C#和VS问题及解决方法记录 - 紫微星 - 博客园
Python ImportError: No module named arcgisscripting
紫微星 · 2009-04-18 · via 博客园 - 紫微星

在做《ArcGIS中的地理处理》练习3的时候遇到这个问题,如果你用的是ArcGIS9.2和Python2.5,应该也会遇到这样的问题:Python ImportError: No module named arcgisscripting。

http://forums.esri.com/Thread.asp?c=93&f=1729&t=216040给出了解决方法。

arcgisscripting is a custom dll module that is build against the python24.dll library; you cannot get it to work under python25; you have to use the old style pywin32 system instead.
Assuming you have pywin32 installed for python 2.5, the script below can serve as a wrapper that will allow you to circumvent the problem. Just save it as arcgisscripting.py in your pythonpath

'''----------------------------------------------------------------------------------
 arcgisscripting.py
 Version:       0.9.1
 Author:        Philippe Le Grand
 Required Argumuments:  None
 Description:	This module serves to replace ESRI's arcgisscripting.dll
 				on configurations where it is not available

	This script is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

   A copy of the GNU General Public License may be obtained
   online at

	   http://www.gnu.org/copyleft/gpl.html

   or by writing to the

	   Free Software Foundation, Inc.,
	   51 Franklin Street, Fifth Floor,
	   Boston, MA  02110-1301  USA

----------------------------------------------------------------------------------'''

import win32com.client

def create(licensetype=None):
	gp = win32com.client.Dispatch("esriGeoprocessing.GpDispatch.1")
	if licensetype is not None:
		Licensed=gp.SetProduct(licensetype)
		if not (Licensed in ["NotLicensed","Failed"]):
			return gp
	#Either the licensetype was not set, or it failed
	#Try to get the highest possible license
	types = ["ArcInfo","ArcEditor","ArcView"]
	for license in types:
		Licensed=gp.CheckProduct(license)
		if not (Licensed in ["NotLicensed","Failed"]):
			Licensed = gp.SetProduct(license)
			print "geoprocessor started with license: %s (%s)"%(license,Licensed)
			return gp
		else:
			print "license %s is %s"%(license,Licensed)
	gp.AddError("No License available for geoprocessor")
	raise ValueError,"No License available for geoprocessor"

if (__name__=="__main__"):
	gp=create()