Python Qt Designer 是否与 Anaconda 捆绑在一起?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37419138/
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-08-19 19:22:27  来源:igfitidea点击:

Is Qt Designer bundled with Anaconda?

pythonqtanaconda

提问by Kierran Purden

I am using Python 3.4 via anaconda 4.0 which has all of the pyQt4 modules packaged with it. Can I use the Qt Designer with this? When I look in /anaconda/pkgs/qt-4.8.7-1/bin there is a Qt icon called Designer, but clicking it yields nothing more than "Designer cannot be opened because of a problem".

我通过 anaconda 4.0 使用 Python 3.4,它包含所有 pyQt4 模块。我可以使用 Qt Designer 吗?当我查看 /anaconda/pkgs/qt-4.8.7-1/bin 时,有一个名为 Designer 的 Qt 图标,但单击它只会产生“由于问题无法打开 Designer”。

Before you all shout at me, the similar question posted at Where is Qt designer app on mac + Anaconda?didn't help me. I tried downloading QtCreator and it doesn't seem to find any other python packages I have installed (not that I actually know what I'm doing).

在你们对我大喊大叫之前,在 Mac + Anaconda 上的 Qt 设计器应用程序哪里发布的类似问题 没有帮助我。我尝试下载 QtCreator,但它似乎没有找到我安装的任何其他 python 包(并不是说我实际上知道我在做什么)。

If I install Qt in its entirety to get the Designer will it cause any confusion with the Qt packages I have installed under Anaconda?

如果我完整安装 Qt 以获得 Designer 会不会与我在 Anaconda 下安装的 Qt 包混淆?

回答by dofine

In anaconda\Library\binthere exists a designer.exefor me.

anaconda\Library\bin那里存在一个designer.exe为我。

Anaconda version 4.0.0

蟒蛇版本 4.0.0

回答by Hill

I was also looking for a QT designer on my Windows 7 which was installed Anaconda 5.1.
The easy way to run a QT designer is that:
Run "Anaconda Prompt" then type designerin the command shell. You will have a QT designer.

我也在我的 Windows 7 上寻找 QT 设计器,它安装了 Anaconda 5.1。
运行 QT 设计器的简单方法是:
运行“ Anaconda Prompt”,然后输入designer命令外壳。您将拥有一个 QT 设计师。

回答by Kierran Purden

Found an answer for myself...

为自己找到了答案......

It was simply a case of deleting the Anaconda directory and reinstalling it. All seems to work fine now

这只是删除Anaconda目录并重新安装它的情况。现在似乎一切正常

回答by Mehi Public

To start QtDesigner in Anaconda:

在 Anaconda 中启动 QtDesigner:

  1. Activate conda environment (if it is not already active) in the terminal:

    $ conda activate

  2. Type "designer" at the prompt (in the activated terminal, of course):

    (base) $ designer

  1. 在终端中激活 conda 环境(如果它尚未激活):

    $ conda 激活

  2. 在提示符下输入“designer”(当然是在激活的终端中):

    (基础)$ 设计师

For advanced users:

对于高级用户:

If you want a bash file with a desktop launcher, here is the code for each:

如果你想要一个带有桌面启动器的 bash 文件,这里是每个文件的代码:

First make a folder "bin" at /home/user_name/bin and put your designer.sh file there.

首先在/home/user_name/bin 下创建一个文件夹“bin”,然后将您的designer.sh 文件放在那里。

The desktop launcher file can be placed anywhere (on the desktop should be fine).

桌面启动文件可以放在任何地方(桌面上应该没问题)。

designer.sh code:

设计师.sh代码:

#!/usr/bin/env bash
echo ""
. /home/user_name/anaconda3/etc/profile.d/conda.sh
conda activate
eval "$(conda shell.bash hook)"
designer

designer.desktop code:

Designer.desktop 代码:

[Desktop Entry]
Version=1.0
Type=Application
Name=Anaconda-Designer
GenericName=AnacondaDesign
Exec=/bin/bash "/home/user_name/bin/designer.sh"
Icon=/home/user_name/anaconda3/lib/python3.7/site-packages/anaconda_navigator/static/images/qtcreator-icon-1024x1024.png
Terminal=false
StartupNotify=true

Don't forget to give executable permissions for these two files and to accept as "trusted" the desktop launcher application (on first launch).

不要忘记为这两个文件授予可执行权限,并接受桌面启动器应用程序(首次启动时)为“受信任”。

I hope it helps.

我希望它有帮助。

回答by ahmed shalaby

I have installed Anaconda 3and I have found the Designer in /Users/apple/anaconda/bin/Designer.app/Contents/MacOS. It works fine

我已经安装了Anaconda 3,并且在 /Users/apple/anaconda/bin/Designer.app/Contents/MacOS. 它工作正常

回答by Komal Gujarathi

Yes, Anaconda packages does have QtDesigner package.

是的,Anaconda 包确实有 QtDesigner 包。

You can check the location of Designer using following steps - first go to the python version installed in your machine, for mac you can type - which python3 Go this location, and then look for QtDesigner.

您可以使用以下步骤检查 Designer 的位置 - 首先转到您机器中安装的 python 版本,对于 mac 您可以键入 - which python3 转到此位置,然后查找 QtDesigner。

There you are.

你在这。

Thank You

谢谢你