小Python+大Python:旋转器不可见/如何使用系统应用程序

2024-06-01 09:38:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在miniconda虚拟环境(python3.6.3)中使用PyGObject和GTK+3.16.6编写一个GUI应用程序。在我的应用程序中,我想使用旋转器,但当我在miniconda环境中启动程序时,不会显示此小部件。如果我在虚拟环境之外启动应用程序(使用Python和安装在系统上的库),小部件将按预期显示。此外,“venv版本”没有使用系统中配置的应用程序外观,这对我来说很有意义,但是缺少旋转器我真的很烦。你知道吗

下面是应用程序的外观(微调器位于右下角):

在虚拟环境中启动 enter image description here

“本机”启动 enter image description here

我想我需要设置一些环境变量,但是我不知道要添加什么,以及如何在虚拟环境中永久性地添加。我想让纺纱机可见,其余的外观不是那么重要。你能帮助我吗?你知道吗

提前谢谢!你知道吗

为完整起见,以下是虚拟环境的conda list -e输出:

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
at-spi2-atk=2.16.0=1
at-spi2-core=2.16.0=1
atk=2.16.0=2
bleach=2.0.0=py36h688b259_0
ca-certificates=2017.11.5=0
cairo=1.14.8=0
certifi=2017.11.5=py36_0
dbus=1.8.20=1
dbus-glib=0.104=1
decorator=4.1.2=py36hd076ac8_0
entrypoints=0.2.3=py36h1aec115_2
expat=2.1.0=0
fontconfig=2.12.1=3
freetype=2.5.5=2
gdk-pixbuf=2.30.8=3
gettext=0.19.7=1
glib=2.51.4=0
gmp=6.1.2=h6c8ec71_1
gobject-introspection=1.51.3=py36_0
gst-plugins-base=1.8.0=0
gstreamer=1.8.0=0
gtk=3.16.6=2
harfbuzz=1.0.1=3
html5lib=0.999999999=py36h2cfc398_0
icu=54.1=0
intel-openmp=2018.0.0=h15fc484_7
ipykernel=4.6.1=py36hbf841aa_0
ipython=6.1.0=py36hc72a948_1
ipython_genutils=0.2.0=py36hb52b0d5_0
ipywidgets=7.0.0=py36h7b55c3a_0
jedi=0.10.2=py36h552def0_0
jinja2=2.9.6=py36h489bce4_1
jpeg=9b=h024ee3a_2
jsonschema=2.6.0=py36h006f8b5_0
jupyter=1.0.0=py36h9896ce5_0
jupyter_client=5.1.0=py36h614e9ea_0
jupyter_console=5.2.0=py36he59e554_1
jupyter_core=4.3.0=py36h357a921_0
libcroco=0.6.8=1
libedit=3.1=heed3624_0
libepoxy=1.3.1=1
libffi=3.2.1=3
libgcc=7.2.0=h69d50b8_2
libgcc-ng=7.2.0=h7cc24e2_2
libgsf=1.14.34=1
libiconv=1.14=4
libpng=1.6.28=2
librsvg=2.40.10=3
libsodium=1.0.15=hf101ebd_0
libstdcxx-ng=7.2.0=h7a57d05_2
libtiff=4.0.8=h90200ff_9
libxcb=1.12=h84ff03f_3
libxml2=2.9.4=0
markupsafe=1.0=py36hd9260cd_1
mistune=0.8.1=py36h3d5977c_0
mkl=2018.0.0=hb491cac_4
nbconvert=5.3.1=py36hb41ffb7_0
nbformat=4.4.0=py36h31c9010_0
ncurses=6.0=h9df7e31_2
notebook=5.2.1=py36h690a4eb_0
numpy=1.13.3=py36ha12f23b_0
openssl=1.0.2l=0
pandoc=1.19.2.1=hea2e7c5_1
pandocfilters=1.4.2=py36ha6701b7_1
pango=1.40.0=0
pcre=8.39=0
pexpect=4.2.1=py36h3b9d41b_0
pickleshare=0.7.4=py36h63277f8_0
pip=9.0.1=py36_0
pixman=0.34.0=0
prompt_toolkit=1.0.15=py36h17d85b1_0
ptyprocess=0.5.2=py36h69acd42_0
pycairo=1.13.3=py36_0
pygments=2.2.0=py36h0d3125c_0
pygobject=3.25.1=py36_0
pyqt=5.6.0=py36_2
python=3.6.3=h0ef2715_3
python-dateutil=2.6.1=py36h88d3b88_1
pyzmq=16.0.2=py36h3b0cf96_2
qt=5.6.2=5
qtconsole=4.3.1=py36h8f73b5b_0
readline=7.0=ha6073c6_4
setuptools=36.7.2=py36_0
simplegeneric=0.8.1=py36h2cb9092_0
sip=4.18.1=py36h51ed4ed_2
six=1.11.0=py36h372c433_1
sqlite=3.20.1=hb898158_2
system=5.8=2
terminado=0.6=py36ha25a19f_0
testpath=0.3.1=py36h8cadb63_0
tk=8.6.7=hc745277_3
tornado=4.5.2=py36h1283b2a_0
traitlets=4.3.2=py36h674d592_0
wcwidth=0.1.7=py36hdf4376a_0
webencodings=0.5.1=py36h800622e_1
wheel=0.30.0=py_1
widgetsnbextension=3.0.2=py36hd01bb71_1
xz=5.2.3=0
zeromq=4.2.2=hbedb6e5_2
zlib=1.2.11=0

Tags: core应用程序部件系统create虚拟环境jupyterconda