Tag Info

New answers tagged

0

The official build doc for python3 on ubuntu seem to be here.


3

The login1 interface provides the signal now. Here is the modified code: #!/usr/bin/python # slightly different code for handling suspend resume # using login1 interface signals # import dbus # for dbus communication (obviously) import gobject # main loop from dbus.mainloop.glib import DBusGMainLoop # integration into the main loop def ...


0

Ok, I found the problem: both pip and pip3 install the executable file in /usr/local/bin. Uninstalling from pip (python2) removes the binary. So I had to uninstall and re-install in pip3 to get things working.


1

This import error occurs on Ubuntu 14.04, but not on Ubuntu 12.04. Basically due to the transition from Python 2.x -> Python 3. Many modules were renamed or merged. Python 3 is NOT backward compatible with Python 2.x. So add this to the list of the gotchas. ImportError: No module named 'gi._glib' debian.org bugreport #705387 from gi._glib import GError ...


0

The best thing you can do to ensure a working, clutter-free operating system, is to assemble it yourself. Start from an ubuntu minimal installation: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/mini.iso If you install it, you just get the command line interface. From there, you can add packages such as a GUI, ...


0

Been there, did that, got the t-shirt, not doing it again! ;) What you're trying to do is: "I just want Windows, not this stupid System32 stuff that is eating up all my hard disk! Let's delete it!" ;) I did the same thing you did and had to install from scratch as I deleted too much, and now I'm much more careful as to what to delete... E.g. Python: ...


0

I suggest you use either df or the disk usage analyzer to find which files are taking up all of the space. Then you can figure out what's creating them.


0

Add #!/usr/bin/env python to the top of the file and save it as script.py. Open up the terminal. Set the file's executable bit by running: chmod +x script.py. Run the script with ./script.py.


0

I would suggest you to go old school way. Use gedit and the terminal. You will learn lot of things. And there's always askubuntu and stackoverflow to help you out if you face any trouble.


2

If you really want to do this from terminal, you have the following choices: use interactive python mode by typing python in the terminal window. This is only useful for testing very short snippets. use a text editor, such as nano or vi or emacs, save your program to a file mypythontest.py and then run it with python python mypythontest.py But since you ...


0

I helped someone with this a few weeks back but I'd already forgotten what I did, so I googled it again and found this: http://ubuntuforums.org/showthread.php?t=2083626&p=12351981#post12351981


0

just type your password and press enter.password is not visible in terminal


0

Nothing will appear since there is no echo feedback when you type your password. When it asks for the password, just type it and press the enter key.


0

I got the error when I upgraded from Ubuntu 14.04 to 14.10. I recreated my virtualenv and the issue went away. So if you're working with a virtualenv, you should recreate it. However if you don't, I suppose that reinstalling your project will work. Don't touch any system libraries! It can work for the time being, but will potentially lead to issues with ...


0

You should probably need to do this: while a < 911111100050: print a sock.send("PAGE %d\r\n" % a) You are not sending the page number but the PAGE 1LDM string in your socket. But as I don't know what are you trying to achieve this is mostly a wild guess.


0

I needed to upgrade numpy pip install -U numpy


0

apt-get install python-pip pip install MultipartPostHandler2 MultipartPostHandler2 is an example (I am the maintainer)


0

Your question is hard to answer, but I'll do my best is there a way to find what line of the code has a problem? You are using python (judging you question's tag), so run your software from a terminal and every time it crashes you'll bet a stacktrace indicating the line were it failed. Or is it normal to have to rewrite everything? There are some ...


1

1) how to set the number of decimal places for answers to calculations For floating point operations (in python2) you have to use float numbers instead of integers, see: >>> 3/2 1 >>> 3/2.0 1.5 >>> 3.0/2 1.5 If you are using python3, then the result is floating, even of both operands are integers: Python 3.4.2 (default, ...


2

The first problem would be because the CGI module hasn't been enabled, so Apache isn't processing anything as CGI. ENable it: sudo a2enmod cgi In Apache2.4, the configuration was cleaned up considerably, and things in the default site definition have been moved to configuration files in conf-available. Among other things, this also includes the ...


0

It seems that each of apt-get and pip installed their own version of the library. Try removing system mysql with sudo apt-get remove python-mysqldb, and you should have something like this: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: python-mysqldb 0 upgraded, 0 newly ...


0

guake depends on notification-daemon: $ apt-cache depends guake guake ... Depends: notification-daemon dunst mate-notification-daemon notify-osd plasma-widgets-workspace xfce4-notifyd It is a hard dependency, so one of those packages must be installed. You could try reinstalling notify-osd, which is the usual package for Unity, or install it if ...


0

self.webview.connect('load_committed', self.change_url) def change_url(self, widget, data=None): self.urlentry.set_text( widget.get_main_frame().get_uri() ) it will work check out


0

Install sudo apt-get install libfuse-dev and retry. It works.


1

See Is it possible to use Python with the Ubuntu SDK? I don't think that the current status is different: pyqt might not be the best choice in terms of licensing commercial applications And taken from the ubuntu-phone mailing list archive: While PyOtherSide may work, it's not a supported language or platform for the Ubuntu SDK, so we can't ...


0

Depending on how you installed python2.7.8 on your system you may not have the ability to import system modules (i.e installed by apt) from your local interpreter. To workaround the problem and run bleachbit (which only requires python >= 2.6), just use: /usr/bin/python /usr/bin/bleachbit


1

In order to build python3.4.2 from source with the _tkinter module you need to install the following build dependency: sudo apt-get install tk8.6-dev Then all you have to do is running make again to add _tkinter support as the setup.py file will automatically detect the tk/tcl headers and create the module: ~/Downloads/Python-3.4.2$ make running build ...


0

You are getting an error because you are not hashing the users' passwords before saving them. Therefore, john is trying to crack a file that has cleartext passwords in it. Below is an example of hashing is using md5. Obviously you should NEVER use this algorithm for real-world password hashing, but it is an easy way to portray the method. import hashlib ...


0

I was researching a consistent way to notify all X users (as root) and my research (looking at a bunch of places on the net) indicated that although it was possible to use notify-send in this way, it required scripting to find DBUS session info and/or DISPLAY's in use and/or Xauthority file names and locations, and even then sometimes people still couldn't ...



Top 50 recent answers are included