【问题标题】:psycopg2 unable to install in pycharmpsycopg2 无法在 pycharm 中安装
【发布时间】:2014-12-07 14:10:18
【问题描述】:

我一直在尝试在 pycharm 中安装 psycopg2,但我无法这样做。我读了几篇文章,他们都谈到了stickpeople psycopg2 安装程序,链接似乎不起作用。这是我收到的错误消息

Downloading/unpacking psycopg2==2.4.5
Cleaning up...
Exception:
Traceback (most recent call last):
 File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
   status = self.run(options, args)
 File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
 File "C:\Python27\lib\site-packages\pip\req.py", line 1197, in prepare_files
    do_download,
 File "C:\Python27\lib\site-packages\pip\req.py", line 1375, in unpack_url
    self.session,`enter code here`
 File "C:\Python27\lib\site-packages\pip\download.py", line 591, in unpack_http_url
     os.rmdir(temp_dir)
 WindowsError: [Error 145] The directory is not empty:     'c:\\users\\501300~1\\appdata\\local\\temp\\pip-1_ogxi-unpack'

【问题讨论】:

  • 什么是 pip 版本?你试过删除有问题的目录吗?

标签: python windows pycharm psycopg2


【解决方案1】:

其他解决方案对我不起作用。当我尝试使用命令安装 psycopg2 时,出现了很多错误。
我通过以下方式成功安装了它:
File -> Settings -> Project Interpreter -> 点击了+ -> Search,然后在那里添加了psycopg2 包。

【讨论】:

    【解决方案2】:

    Pycharm 在安装 psycopg2 时遇到问题

    尝试先删除那个临时目录

    然后尝试使用 pip 安装它

    pip install psycopg2==2.4.5
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-06
      • 2018-09-23
      • 2018-04-29
      • 2017-12-05
      • 2021-11-06
      • 2020-07-05
      • 2021-08-06
      • 2015-01-27
      相关资源
      最近更新 更多