postgresql pgAdmin 4 未在 Windows 10 64 位上启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39926981/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:19:23  来源:igfitidea点击:

pgAdmin 4 not starting on Windows 10 64bit

postgresqlstartuppgadmin

提问by blackgis

After a fresh install of postgres 9.6.0.1 for Windows 10 64bit I am not able to get pgAdmin 4 starting.

在为 Windows 10 64 位全新安装 postgres 9.6.0.1 后,我无法启动 pgAdmin 4。

First it throws an fatal error message:

首先它抛出一个致命的错误信息:

message with fatal error when trying to launch pgAdmin 4

尝试启动 pgAdmin 4 时出现致命错误的消息

After OK, that message appears:

确定后,出现该消息:

Configuration path of pgadmin

pgadmin 的配置路径

Is there anything wrong? because after OK - the program won't start.

有什么不对的吗?因为确定后 - 程序将无法启动。

What can I do to get pgadmin 4 running? What should I enter in Python Path and what in Application Path?

我该怎么做才能让 pgadmin 4 运行?我应该在 Python Path 中输入什么,在 Application Path 中输入什么?

采纳答案by blackgis

I have found now the problem, it was the Java installation on which pgadmin 4 depend heavily.

我现在发现了问题,这是 pgadmin 4 严重依赖的 Java 安装。

In Windows when installing Java 8 (Java SE in this case) you do not have to use JAVA_HOME and JAVA_JRE anylonger and you can install java with default path settings (with the version number)

在 Windows 中安装 Java 8(在本例中为 Java SE)时,您不必再使用 JAVA_HOME 和 JAVA_JRE,您可以使用默认路径设置(使用版本号)安装 java

So I installed JAVA SDK 8 32 and 64bit and pgadmin start up normally. The PATH variable includes only C:\ProgramData\Oracle\Java\javapath, thats all and let you use allways the latest version of java you installed.

所以我安装了JAVA SDK 8 32位和64位,pgadmin正常启动。PATH 变量仅包括 C:\ProgramData\Oracle\Java\javapath,仅此而已,让您始终使用您安装的最新版本的 java。

回答by Richard Lee

Try to install pgamin 4.5.1, it works for me (w10 x64) pgadmin 4.1.5

尝试安装 pgamin 4.5.1,它适用于我 ( w10x64) pgadmin 4.1.5

回答by thank_for_this

After struggling for weeks with this problem I found a solution. In my case I have Anaconda installed and maybe it affects PgAdmin in some way, I don't know. In order to start PgAdmin I followed these steps:

在为这个问题苦苦挣扎数周后,我找到了解决方案。就我而言,我安装了 Anaconda,也许它会以某种方式影响 PgAdmin,我不知道。为了启动 PgAdmin,我遵循了以下步骤:

  1. Open cmd and move to C:\Program Files\PostgreSQL\11\pgAdmin 4\web
  2. Run pgAdmin4.pywith your Python distribution. I had to install several libraries.
  3. In my case, an error appeared, I needed to change Line #32 of C:\Program Files\PostgreSQL\11\pgAdmin 4\web\pgadmin\browser\__init__.py. More precisely:
  1. 打开cmd并移动到 C:\Program Files\PostgreSQL\11\pgAdmin 4\web
  2. pgAdmin4.py使用您的 Python 发行版运行。我不得不安装几个库。
  3. 就我而言,出现错误,我需要更改C:\Program Files\PostgreSQL\11\pgAdmin 4\web\pgadmin\browser\__init__.py. 更确切地说:

from flask_security.views import _security, _commit, default_render_json, _ctxto

from flask_security.views import _security, _commit, default_render_json, _ctx

from flask_security.views import _security, _commit, _render_json, _ctx

from flask_security.views import _security, _commit, _render_json, _ctx

  1. Last, I needed to edited line socket module from Python libraries, gethostbyaddr(name) found non-ASCII symbols in the host name of my computer, I don't have any of them :S. Well, I changed line #687
  1. 最后,我需要从 Python 库中编辑 line socket 模块,gethostbyaddr(name) 在我的计算机的主机名中找到了非 ASCII 符号,我没有它们中的任何一个:S。好吧,我改变了#687行

hostname, aliases, ipaddrs = gethostbyaddr(name)to

hostname, aliases, ipaddrs = gethostbyaddr(name)

hostname, aliases, ipaddrs = gethostbyaddr("")

hostname, aliases, ipaddrs = gethostbyaddr("")

  1. After all of these steps I run pgAdmin4.py again and it worked.
  1. 在所有这些步骤之后,我再次运行 pgAdmin4.py 并且它起作用了。

Hope it helps.

希望能帮助到你。

回答by thank_for_this

I had the same problem. I think, the installation of Visual C++ 2013 Redistributable is the source. I fixed it uninstalling pgAdmin 4 and installing it again. It tried to install Visual C++ 2013 Redistributable again, but it was already installed and now it works.

我有同样的问题。我认为,Visual C++ 2013 Redistributable 的安装是来源。我修复了它卸载 pgAdmin 4 并再次安装它。它尝试再次安装 Visual C++ 2013 Redistributable,但它已经安装并且现在可以工作了。

Hope this helps.

希望这可以帮助。