【问题标题】:IOError: [Errno 13] Permission denied: while installing pandas in OSGeo4W ShellIOError:[Errno 13] Permission denied:在 OSGeo4W Shell 中安装 pandas 时
【发布时间】:2016-03-25 06:31:16
【问题描述】:

我已经以管理员身份运行实例化了 osgeo4w,但它仍然给了我权限被拒绝。 我正在尝试在 Quantum GIS 2.8 上安装 pandas,我已经使用 pip 命令安装了 sklearn,它已成功安装。

但是当我尝试安装 pandas 时,出现如下错误:

  C:\Windows\System32>pip install pandas
    Collecting pandas
    C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
      SNIMissingWarning
    C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
      InsecurePlatformWarning
      Using cached pandas-0.18.0-cp27-cp27m-win_amd64.whl
    Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in c:\progra~1\qgiswi~1\apps\python27\lib\site-packages\pytz-2012j-py2.7.egg (from pandas)
    Requirement already satisfied (use --upgrade to upgrade): python-dateutil in c:\osgeo4~1\apps\python27\lib\site-packages\python_dateutil-2.1-py2.7.egg (from pandas)
    Collecting numpy>=1.7.0 (from pandas)
      Using cached numpy-1.10.4-cp27-none-win_amd64.whl
    Requirement already satisfied (use --upgrade to upgrade): six in c:\osgeo4~1\apps\python27\lib\site-packages\six-1.3.0-py2.7.egg (from python-dateutil->pandas)
    Installing collected packages: numpy, pandas
Exception:
Traceback (most recent call last):
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\basecommand.py", line 209, in main
    status = self.run(options, args)
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\commands\install.py", line 317, in run
    prefix=options.prefix_path,
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\req\req_set.py", line 732, in install
    **kwargs
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\req\req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\req\req_install.py", line 1030, in move_wheel_files
    isolated=self.isolated,
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\wheel.py", line 344, in move_wheel_files
    clobber(source, lib_dir, True)
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\site-packages\pip\wheel.py", line 322, in clobber
    shutil.copyfile(srcfile, destfile)
  File "C:\PROGRA~1\QGISWI~1\apps\Python27\lib\shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\Lib\\site-packages\\numpy\\core\\multiarray.pyd'

有什么解决办法吗?

【问题讨论】:

    标签: python pandas installation osgeo


    【解决方案1】:

    如果有人(比如我)发现这篇文章有用...

    将熊猫从 0.18 升级到 0.20 时,我遇到了同样的问题 pip install --upgrade pandas.

    问题:numpy 和 pandas 安装程序想要编写已存在于 ../site-packages/numpy 和 ../site-packages/pandas 文件夹中的较新文件。

    由于某种原因,shutil 无法以 'wb' 模式打开这些文件。

    虽然满足numpy>=1.7.0的要求,但使用“--upgrade”也可以升级numpy。

    解决方案:

    为了避免IO Error: [Errno 13] Permission denied: ...,请将numpy和pandas都卸载,然后重新安装(numpy优先):

        pip uninstall numpy
        pip install numpy
        pip uninstall pandas
        pip install pandas
    

    【讨论】:

      猜你喜欢
      • 2016-02-28
      • 2018-08-15
      • 2015-11-21
      • 1970-01-01
      • 2013-06-07
      • 2014-05-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多