Tag Info

New answers tagged

0

sudo apt-get install python-setuptools


0

On Ubuntu 14.04 Python 3.4 is installed by default. As recommended by PEP-394 you can use python and python2 to run Python v2 (2.7) and python3 to run Python v3 (3.4).


0

Python3.4 is already installed on your system, you just need to call it with python3 instead of python


0

You should already have it install: python3 -V To install idle 3: sudo apt-get install idle-python3.4


4

python 3.4 is installed on the stable release of Ubuntu 14.04. You need to use python3 to use python 3.4. For example, to compile a script file.py, use: python3 file.py This will use python 3.4 to interpret your program or you can use the shebang to make it executable. The first line of your program should be: #!/usr/bin/python3 and then use chmod +x ...


1

You can usually do this by passing --prefix=/path/to/empty/folder to configure. This will put the installed components into your previously-empty folder in the correct structure once you run make install. Then, you can copy all the contents of this folder onto your target system.


-1

I faced the same problem and I get two solutions: 1.- After running ./camdesk.py precione F1 and start working. 2.- If you want to execute the command, and you need to work immediately add the following line at the end of init method: self.player.set_state (gst.STATE_PLAYING) stay follows. def __ init__ (self): . . . bus.connect ("sync-message :: ...


8

For 14.04: server and desktop images The situation is: there is no python2 on the server image but python2 is part of the the desktop image The logic I quote: It is a release goal for Ubuntu 14.04 (Trusty Tahr) that we ship only Python 3 on the touch, server, and desktop images. Don't worry, Python 2.7 will still be available in the archive, and ...


-1

According to packages.ubuntu.com Python 2.7.5 is the default version.


6

No Python2.7 is still there for desktop, check the CD manifest here: python2.7 2.7.6-8 But has been removed from the server image (manifest) as explained in the migration plan where desktop is the last target.


2

My problem turned out to be solely due to an altered /usr/bin/python symlink as suggested in the error message. I was using update-alternatives with /usr/bin/python so it was pointing to /etc/alternatives/python. Turned out that do-release-upgrade is really strict with this symlink and merely selecting python2.7 with update-alternatives isn't enough, so I ...


1

A daemon is basically a program with no direct user interaction... So there is nothing really specific about it. Nevertheless, you have to take care about some keys points : any output or log should go to syslog, not the standard output at startup, create a pid file under /var/run. And clear it at shutdown. you have to write a service supervision file, to ...


0

I am not familiar with ipaddr, so I can only answer in general, with the title of your question as a starting point: Looking at the command you use (in your post) you do not use the extension .py. If you do not use it in your command, you should remove it from the script itself as well (and make it executable indeed). I looked into the name of the script, ...


1

Since ipaddr.py is library for inspecting and manipulating IP address, the first thing you'll want to do is create some objects. You can use ipaddr to create objects from strings, integers or other ipaddr objects. Check the following wiki page for examples: http://code.google.com/p/ipaddr-py/wiki/Using3144 Depending on your needs, installing the ...


2

Your best bet is to use an alias. Open your ~/.bash_aliases file and type the following: alias python='/path/to/python/in/your/home/directory' with the '. For example, if your python binary file is /home/user/Documents/bin/python, the alias would be: alias python='/home/user/Documents/bin/python' This would not break existing application, since they ...


0

Since you're building opencv from sources, try to follow the build process used by the debian packaging to ensure the compatibility with linux. I'm thinking about the V4L2 support for example: CMAKE_ARCH_FLAGS += -DWITH_V4L=ON


1

Before installing the development version of OpenCV, I'd suggest to use this code to set the capture size (from the link you posted I assume you're using python): import cv2 cap = cv2.VideoCapture(device_no) cap.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width) cap.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height) To install the development version of opencv ...


2

Open terminal, then launch python interpeter: python then, import opencv: import cv2 finally, print version: cv2.__version__ if you want to install the latest development version of opencv, you can follow the instructions of the official documentation of opencv from here


0

Following are the dependencies for Pandas: NumPy python-dateutil pytz And the Pandas project list the following two as highly recommended dependencies: numexpr bottleneck It looks like apt-get only installed the required dependencies and not the highly recommended ones; as such you get an ImportError when trying to import numexpr and bottleneck. ...


1

You can use pip3 to install ipython. pip3 install ipython


0

A very detailed answer would be beyond the scope of a single question, but here's the general outline. It's very easy, but success will partly depend on the ability of your computer to boot from an external hard drive. This depends on the bios. Before starting, make sure your bios has an option to boot from a USB HD. If all you need is the basic install, ...


0

Ubuntu can, and does, run well entirely from an external hard drive. I have used Ubuntu this way for years. It doesn't affect Windows. There's nothing special about installing to USB drives. You connect the USB drive, boot using a CD or an pen drive, and choose the external disk when it comes to selecting the installation location. However: You will have ...


0

I don't think this is fully supported via Wubi, but it can be done. I'm not entirely sure of how you plan to use it. In the past, I've unplugged my Windows device, plugged in my external device, and just run through the install using the external (and in many cases, the only) drive. Ubuntu will install correctly and treat that drive as "a drive" - nothing ...


2

Your issue is not related to the installation of the development package for python but since you decided to use Intel’s MKL library to build PSI4 you have to have them properly installed somewhere. For a Linux compilation though you could select the ATLAS library as stated in the Recommendations for BLAS and LAPACK libraries: sudo apt-get install ...


0

Today, I faced exactly the same issue using the same manual as you did. I guess the problem is related to the fact that some python dependencies are installed for 2.7 and some are installed for 3.2. So I decided to install 2.7 only and skip all packages for 3.2. $ sudo apt-get install apache2 apache2-mpm-worker \ apache2-utils apache2.2-bin ...


0

sudo apt-get install python-setuptools pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.2.tar.gz wget http://www.antlr3.org/download/antlr-3.1.2.jar java -classpath "antlr-3.1.2.jar" org.antlr.Tool *.g


2

When you use sudo pip install pandas (with sudo) you use the system wide binary of pip. It is probably located /usr/bin/pip. You should activate your virtualenv and run pip install pandas, without sudo. Than you use the pip binary of your virtualenv. Now pip freeze will give the expected results.


1

To get the path, you should be able to do something like this (untested): def on_iconview_selection_changed(self, widget): try: path = widget.get_selected_items()[0] except IndexError: # No icon selected, so the list returned by get_selected_items() is # empty and indexing returns an IndexError ...


0

Try changing to the text console by hitting Ctrl+Alt+F1. Log in with your username and password. Then type: sudo apt-get install python python-minimal Enter your password again. Confirm the installation with "Y". After the installation is complete, type: sudo reboot The problem should be fixed.


0

Most modern CPUs can adjust their clock frequency. The default governor on linux is "on demand" which keeps the clock speed low to save power when idle, and speeds it up to do work when needed. See https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt


1

That's a coincidence, it's your system changing the current cpu frequency. Check with this command in a terminal: watch -n 0 "lscpu | grep 'MHz'" You will see (when waiting a bit) that the system's cpu frequency is switching. You can also get your current cpu frequency with this command: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq And ...


1

You can use setuid. 6.31 setuid Added in Upstart v1.4 Syntax: setuid <username> Changes to the user before running the job's process. (and setgid if you want a group). You can also add -u <username> to exec.


2

Set py-shell-name to python3, for example by using Meta+x customize-variable Returnpy-shell-name


1

Just got this error in Ubuntu 13.10, where ia32-libs is no longer available. It appears the solution today is to either manually repackage fluxgui with the new 32-bit packages, or install ia32-libs from the 13.04 repository (not recommended). See: http://askubuntu.com/a/394156/50450. I ended up just grabbing the pre-built 64-bit CLI daemon from ...


0

It seems like there should be a more efficient way of doing this, however this should give you the result you want: lsof -Fn +D $HOME | sed -n '/^n/ s/n//p' | sort -u See this related question on stackoverflow Check for open files with Python in Linux.


0

The lsof command should work for you. Try lsof | grep cwd where cwd stands for current working directory.


1

Err pulls in a lot of dependencies along with it, so I would suggest to use Virtualenv in order to install it. And since they mention that as of Err v2.0, they have written it with Python 3 in mind, you should use Python 3 if you can (although Err is compatible with Python 2.7 too). To understand how to use virtualenv, have a look at its documentation and ...


1

Open a tty (Ctrl+ALt+F1) and login. Then run: sudo apt-get install ubuntu-desktop.


1

Ubuntu 12.04 ships with python 2.7.3. You should be able to download https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz and follow the README file. The steps should be simple enough. ./configure make make install Note that you don't have to remove python-2.7.3 from your system to install an other version. You can switch between different versions ...


0

If you already put your .so file in /usr/lib/python2.7/dist-packages, try to make a new python file (in the same dir) named as 'my_lib.py'. Put the below code in it: def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'hello_world.so') __loader__ = ...


1

The simplest option to try out Savanna is to use devstack in a virtual machine. I was using an Ubuntu 12.04 virtual instance in my tests. In that environment we need to execute the following commands to install devstack and Savanna API: $ sudo apt-get install git-core $ git clone https://github.com/openstack-dev/devstack.git $ vi localrc # edit localrc ...


0

first of all never use apt-get to install virtualenv. Hell I want to say never use sudo to install virtualenv but I don't want to make your life more complicated right know. Did you include virtualenvwrapper in your .zshrc, I've got a billion question, better to remove everything, here's how to install it properly if you want to take a look curl -O ...


1

from a commandline; python FILENAME.py then just enter. Then you should get an installation screen.


1

As a workaround, you can simply redirect the output yourself instead of using the -f option: adb logcat > log I am guessing that the program might change it's working directory so it's trying to create log somewhere where you have no write access. If so, you should also be able to get it to work using an absolute path: adb logcat > ...


2

You are probably looking for system() method in os package. Have rewritten the snippet, had a few corrections too: #!/usr/bin/env python import pygtk import os pygtk.require('2.0') import gtk class Base: def send(self, widget): os.system('ifconfig') #this executes commands on the terminal def writecommand(self, widget): ...


0

I had the same problem. This how I solved it: Uninstall idle from where you installed it. Install IDLE (using Python-3.3) from the Ubuntu Software Center. (It didn't work when I installed from Synaptic) Enter in terminal: gksudo gedit /usr/share/applications/idle-python3.3.desktop Edit file so it looks like this (exactly): [Desktop Entry] Name=IDLE ...


0

The package that offends you is python-gi, may be it is misconfigured. Reinstall it from command line sudo apt-get purge python-gi sudo apt-get install python-gi Just in case, make sure it does not try to delete anything else, (it will ask if it wants to). You may try in with software-center too.


1

This is not exactly an answer to your question, but a workaround, just in case you need it. python3 comes installed by default on Ubuntu 14.04. So the best way you can start python3 when you type python on the terminal is opening your ~/.bash_aliases file and typing this: alias python='python3` and then doing a source ~/.bash_aliases. You'll get python3 ...


0

Too late for you, probably, but in case this is useful for anyone else... here's how to take advantage of the fact that Python 3.4 is in the Trusty repositories. Not sure if there are problems with this method but it's working for me. Set your preferred release to Saucy (to prevent problems from what we're about to do next): sudo echo ...


0

For Django applications, Adam Bard recommends locating your virtualenv at /opt/apps/<appname>-env and your application proper at /opt/apps/<appname>-env/site. (Many thanks to don.joey for the excellent link.) Slightly unrelated, I also found Hynek Schlawack's Python Deployment Anti-Patterns and Python Application Deployment with Native Packages ...



Top 50 recent answers are included