我已经安装了 Eclipse + PyDev + Python 3.2。现在我在 PyDev 中有两个 Python 解释器:Python 2.7 和 Python 3.2。如果我尝试import pygtk使用 2.7 解释器执行命令它工作正常,但使用 Python 3.2 它会引发ImportError: No module named pygtk.
如何让 PyGTK 与 Python 3.2 一起工作?
如何安装和配置 IPython,使其在 11.10 上使用 Python3.2?我已经通过安装检查过
sudo apt-get install ipython
Run Code Online (Sandbox Code Playgroud)
将使用python2.7.
$ sudo python3 configure.py
Determining the layout of your Qt installation...
This is the GPL version of PyQt 4.8.5 (licensed under the GNU General Public
License) for Python 3.2.2 on linux2.
Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
Do you …Run Code Online (Sandbox Code Playgroud) 我对 GDB 有问题。每当我尝试调试任何 C++ 程序时,在运行它之后,GDB 都会出现以下错误:
(gdb) run
Starting program: /home/errikos/Workspaces/tests/a.out
Traceback (most recent call last):
File "/usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
Traceback (most recent call last):
File "/usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
Run Code Online (Sandbox Code Playgroud)
之后,GDB 继续运行(即不会完全崩溃)。
我知道有几个关于此的错误报告(此处、此处和此处)。在第二份报告中,还声称发布了修复程序。在第三个中,有一个符号链接解决方法,它对我不起作用(我不喜欢它,即使它有效)。
有没有人找到解决方法?有没有遗漏的包裹?
注意:我已激活 Ubuntu 工具链测试版本 (ppa:ubuntu-toolchain-r/test) PPA。
我使用的是 Ubuntu 13.10。我有 python 2.7 和 python 3.3。我已经在 python 2.7 中正确安装了 pygame。我如何在 python3.3 中安装它。pygame 是否支持 python3.3?
malikarumi@Tetouan2:~$ pip install virtualenv
Collecting virtualenv
Downloading virtualenv-12.0.7-py2.py3-none-any.whl (1.8MB)
100% |################################| 1.8MB 330kB/s
malikarumi@Tetouan2:~$ pip freeze
(a lot of stuff, but not virtualenv)
malikarumi@Tetouan2:~$ virtualenv testvenv1
The program 'virtualenv' is currently not installed. You can install it by typing:
sudo apt-get install python-virtualenv
Run Code Online (Sandbox Code Playgroud)
这里发生了什么?是 python-virtualenv == pyvenv 吗?那不是还坏了吗?原来的 virtualenv 仍然适用于 python 吗?如果 venv(名称变体太多!!!)是标准库https://docs.python.org/3/library/venv.html 的一部分,为什么我被告知要安装它?
当我尝试安装它时,我得到了:
malikarumi@Tetouan2:~$ sudo apt-get install python-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed: …Run Code Online (Sandbox Code Playgroud) 假设我想在 Python 3 中编程,我应该从 Ubuntu 的软件中心安装哪个 IDLE 包?
我尝试使用 PyQt5 QtWebEngineWidgets 运行 python 脚本,但它抛出错误:
from PyQt5.QtWebEngineWidgets import (
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
Run Code Online (Sandbox Code Playgroud)
我想有一个包裹丢失了,但是是哪一个?python3-pyqt5.qtwebkit已安装。
如何让这个工作?
我无法在系统设置中打开软件和更新配置窗口。在从终端打开系统设置并单击软件和更新后,我能够做的最好的事情是以下输出:
$ sudo unity-control-center
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gdk, Gtk, Gio, GLib
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File …Run Code Online (Sandbox Code Playgroud) 涉及Alt密钥的快捷方式在 pycharm 中不起作用。
例如,我的机器上“查找用法”的快捷方式是Alt+ F7,但是每当我按下此键时,我的光标就会从箭头变为手形(移动窗口时它会变为图标)。
我正在使用 Ubuntu 16.04。
我在http://hplipopensource.com/hplip-web/install/manual/distros/ubuntu.html 上安装了 Hp 打印机失败 我需要帮助的是如何删除打印机软件以便我可以重新安装。我也是python 2还是3?在 16.04 64 位?我不小心下载了 HPLIP,双击该文件并收到一条错误消息,然后单击继续。然后我尝试了手动安装
:~$ sudo hp-setup
[sudo] password for
HP Linux Imaging and Printing System (ver. 3.16.3)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
error: HPLIP is not installed properly or is installed without graphical support. Please reinstall HPLIP …Run Code Online (Sandbox Code Playgroud)