Tag: python

如何在Ubuntu 12.04中创建新应用程序时快速设置使用python3

我刚开始学习python并使用ubuntu 12.04中的标准工具集(quick,glade,gedit)。 当我quickly create ubuntu-application foo ,应用程序默认使用python 2.7。 我宁愿使用python3,因为它是我正在学习的版本,计划是将python2降低14.04。 如何在创建新应用程序时快速配置使用python3? (我已经安装了它,但是不想将它设置为整个系统的默认设置以避免破坏)。

与python有关的重复性错误?

所以我有这个错误,这显然是一个已知的问题。 我正在寻找一个解决方法,直到它被修复,因为我没有能力去没有系统备份。 Traceback (most recent call last): File “/usr/bin/duplicity”, line 1532, in with_tempdir(main) File “/usr/bin/duplicity”, line 1526, in with_tempdir fn() File “/usr/bin/duplicity”, line 1380, in main do_backup(action) File “/usr/bin/duplicity”, line 1401, in do_backup sync_archive(decrypt) File “/usr/bin/duplicity”, line 1139, in sync_archive remote_metafiles, ignored, rem_needpass = get_metafiles(remlist) File “/usr/bin/duplicity”, line 1029, in get_metafiles pr = file_naming.parse(fn) File […]

错误/ usr / bin / ld:找不到-lssl

我怎么解决这个问题? /usr/bin/ld: cannot find -lssl /usr/bin/ld: cannot find -lcrypto collect2: error: ld returned 1 exit status error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1 我尝试安装以下命令 sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip sudo pip install lxml

Ubuntu 16.04上的Python 3.4

我刚刚使用./configure make install过程在Ubuntu 16.04上安装了Python 3.4。 我正在尝试安装Flask,并且在使用3.4创建的virtualenv使用pip时遇到问题。 使用pip安装到Python 2.7, pip3安装到3.5。 尝试任何其他方法会产生错误。 我如何为Python 3.4.3调用pip?

升级Python

根据官方Python网站 ,Python 2的当前版本是2.7.10 。 在我的电脑上,我有2.7.6 : $ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> exit() 我想我会使用apt-get更新到2.7.10 。 但是,这不起作用: $ sudo apt-get install python2.7 Reading package lists… Done Building dependency tree Reading state information… Done python2.7 is already the newest version. […]

我无法在Ubuntu14.04上打开软件更新程序和统一调整工具

我几乎每次尝试更新时都会收到通知。 那个说明’检查更新时发生错误=> [TR语言]Güncellemelerdenetlenirkenbirsorunoluştu。 我无法打开软件更新程序,语言,Unity调整工具。 $ sudo unity-tweak-tool 在这里输入代码Traceback(最近一次调用最后一次): 文件“/ usr / bin / unity-tweak-tool”,第33行,in 导入UnityTweakTool 文件“/ usr / lib / python3 / dist-packages / UnityTweakTool / init .py”,第39行, import dbus,dbus.service 文件“/usr/lib/python2.7/dist-packages/dbus/init .py”,第82行,in 将dbus.types导入为类型 文件“/usr/lib/python2.7/dist-packages/dbus/types.py”,第6行,in 来自_dbus_bindings import( ImportError:/usr/lib/python2.7/dist-packages/_dbus_bindings.so:未定义的符号:_Py_ZeroStruct sys.excepthook中的错误: 回溯(最近的呼叫最后): 在apport_excepthook中输入文件“/usr/lib/python3/dist-packages/apport_python_hook.py”,第63行 从apport.fileutils导入possible_packaged,get_recent_crashes 文件“/ usr / lib / python3 / dist-packages / apport / init .py”,第5行,in 来自apport.report […]

如何使用xrandr列出连接的监视器?

我正在为Ubuntu开发一个python应用程序,使用户能够在不需要图形驱动程序的情况下获得所需的分辨率。 为了做到这一点,我一直在使用xrandr ,到目前为止,它已经非常有用 但是,我现在有一个问题; 如何检测显示器名称? 我打算通过os.system使用终端命令,修改终端输出以获得所需的监视器输出,然后将其存储在程序中。 不幸的是,尽管经常搜索,但我一直无法知道如何做到这一点。 有什么方法可以做到这一点吗? 总结一下: 我正在寻找一个终端命令,它给我一个显示器名称,如VGA1或DVI-0

未满足的依赖项错误

所以有一些未满足的依赖关系,我无法安装任何东西而不会摆脱它们。 当我输入: sudo apt-get install -f 我明白了: patrick@patrick-Z97N-WIFI:~$ sudo apt-get install -f [sudo] password for patrick: Reading package lists… Done Building dependency tree Reading state information… Done Correcting dependencies… failed. The following packages have unmet dependencies: aptitude:i386 : Depends: libapt-pkg4.12:i386 (>= 0.8.16~exp12ubuntu6) but it is not installed Depends: libboost-iostreams1.46.1:i386 (>= 1.46.1-1) but it is not […]

是否可以为终端窗口指定一个唯一的名称来通过python运行命令?

我必须通过Python中的os.system()运行终端代码。 两个命令应分别在两个端子中运行。 是否可以为终端窗口指定唯一的名称/ ID以在其指定的终端窗口中运行每个命令?

如何使用python3和PyQt创建appmenu?

我正在寻找一种使用python3.2和pyqt4创建appmenu指标的方法。 请帮我。