WindowsError:[错误5]使用Canopy安装statsmodels时拒绝访问

时间:2016-12-17 04:08:58

标签: python python-2.7 scikit-learn statsmodels canopy

我是python的完全新手。我最近安装了Canopy,然后成功安装了包xlrd。但是,我尝试使用包管理器安装statsmodel和scikit_learn。这是我尝试安装时的错误日志。

热身......

Fetching: intel_runtime-14.0.6.241-1.egg (4.63 MB)
[................................................................................]

Fetching: MKL-2017.0.1-1.egg (139.55 MB)
[................................................................................]

Fetching: numpy-1.10.4-4.egg (3.40 MB)
[................................................................................]

Fetching: scipy-0.17.1-3.egg (12.72 MB)
[................................................................................]

Fetching: setuptools-23.1.0-2.egg (681 KB)
[................................................................................]

Fetching: patsy-0.4.1-2.egg (474 KB)
[................................................................................]

Fetching: pandas-0.19.0-1.egg (9.57 MB)
[................................................................................]

Fetching: statsmodels-0.6.1-18.egg (5.98 MB)
[................................................................................]

Removing egg: pandas-0.18.0-8.egg (24.96 MB)
[................................................................................]

Removing egg: setuptools-23.1.0-1.egg (1.74 MB)
[................................................................................]

Removing egg: scipy-0.17.1-1.egg (37.65 MB)
[................................................................................]

Removing egg: numpy-1.10.4-1.egg (11.98 MB)
[................................................................................]

Removing egg: MKL-11.1.4-1.egg (230.83 MB)
[................................................................................]

Installing egg: intel_runtime-14.0.6.241-1.egg (13.36 MB)
[................................................................................]

Installing egg: MKL-2017.0.1-1.egg (389.41 MB)
[................................................................................]

Installing egg: MKL-2017.0.1-1.egg (389.41 MB)
[................................................................................]

追踪(最近一次呼叫最后一次):

  

文件   “打造\ bdist.win-AMD64 \蛋\ canopy_dashboard \帕克曼\ package_action_worker.py”   第54行,在运行文件中   “打造\ bdist.win-AMD64 \蛋\ canopy_dashboard \帕克曼\ package_action.py”   第193行,执行文件   “build \ bdist.win-amd64 \ egg \ canopy_dashboard \ packman \ packman.py”,line   346,在文件中   “build \ bdist.win-amd64 \ egg \ canopy_dashboard \ packman \ packman.py”,line   893,在_install文件中   “构建\ bdist.win-AMD64 \蛋\ canopy_platform \ cpython_packages_manager.py”   第102行,在install_package中PackageInstallationError:安装   包statsmodels 0.6.1-18失败。详情如下:stdout:   stderr:exception:Traceback(最近一次调用最后一次):文件   “打造\ bdist.win-AMD64 \蛋\ canopy_platform \资产\ enpkg_slave.py”   第358行,在主文件中   “打造\ bdist.win-AMD64 \蛋\ canopy_platform \资产\ enpkg_slave.py”   第84行,在install_package文件中   “打造\ bdist.win-AMD64 \蛋\ canopy_platform \资产\ enpkg_slave.py”   第96行,在install_packages文件中   “F:\ Udemy \雨棚\工作区\用户\ LIB \站点包\ enstaller \ CLI \ utils.py”   第179行,在install_req中       enpkg.execute(actions)文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ enstaller \ enpkg.py”,   第350行,执行中       action.execute()文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ enstaller \ enpkg.py”,   第149行,执行中       对于self.iter_execute()中的current_extracted_size:文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ enstaller \ enpkg.py”,   第143行,在iter_execute中       对于installer.install_iterator(extra_info)中的步骤:文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ egginst \ main.py”,   第461行,在install_iterator中       n = self._extract(arcname,is_custom_egg)文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ egginst \ main.py”,   第479行,在_extract中       self._write_arcname(name)文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ egginst \ main.py”,   第557行,在_write_arcname中       self.z.extract_to(arcname,destination,self.prefix)文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ egginst_zipfile.py”,   第35行,在extract_to中       return self._extract_member_to(member,destination,path,pwd)文件   “F:\ Udemy \雨棚\工作区\用户\ LIB \站点包\ egginst_zipfile.py”   第96行,在_extract_member_to中       _unlink_if_exists(targetpath)文件“F:\ Udemy \ canopy \ Workspace \ User \ lib \ site-packages \ egginst_zipfile.py”,   第113行,在_unlink_if_exists中       os.unlink(p)WindowsError:[错误5]访问被拒绝:'F:\ Udemy \ canopy \ Workspace \ User \ Scripts \ mk2iomp5md.dll'

我尝试在管理模式下运行Canopy,也从命令提示符处使用命令“python -m pip install statsmodels”,但这也没有帮助。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

对不起,不好意思。 Windows有时会对库文件进行锁定,从而干扰软件包安装。 Canopy 2.0(1月)将更好地防范这种情况。同时,请重新启动Windows,然后从开始菜单打开Canopy命令提示符(不要打开Canopy本身),并键入以下命令:

enpkg statsmodels