New answers tagged

0

Fire up a terminal and run: /usr/bin/python2 import pygame If it doesn't give you any errors, you're good to go! You can then exit the interpreter with: CTRL+D If it worked fine, that probably means you installed a custom version of Python that doesn't see the modules installed by apt-get.


0

pip is a python2 file. To use pip with python3 : Install and use pip3. sudo apt install python3-pip ( provides /usr/bin/pip3 ) pip3 install youtube-dl


0

Replace your subprocess.run() command with this: subprocess.call(self.items, stdout=DEVNULL, stderr=DEVNULL,shell=True) This should work, however, I'd personally approach this via using lists, and call specific shell per each shell script. shell=True however will call /bin/sh on your bootstrap.sh , which hopefully doesn't contain any bashisms and is ...


0

You have several issues there: You are missing self in for items in packages: self.packages is a string, when you call for item self.packages it iterates over each character of that string. You should have declared packages as list from the beginning or added .split() at the end. your self.packages is long, doesn't conform to PEP8 standard of 79 ...


0

Fixed : def package_installation(self): self.apt = "apt " self.ins = "install " self.packages = "python-pip python-sqlalchemy mongodb python-bson python-dpkt python-jinja2 python-magic python-gridfs python-libvirt python-bottle python-pefile python-chardet git build-essential autoconf automake libtool dh-autoreconf libcurl4-gnutls-dev libmagic-...


2

There are two ways of fixing it, the hard way and the easy way. The hard way You didn't type the correct package name for Python Interpreter (v3.4) in your question. Open the terminal and type: sudo apt-get install python3.4 In Ubuntu 14.04, this command will install the python3.4 package correctly. Using the Ubuntu Software Center in Ubuntu 14.04 to ...


2

As you can see from http://packages.ubuntu.com/search?keywords=python3.4&searchon=names&suite=xenial&section=all, there is no package for python3.4 for Ubuntu 16.04. You can compile and install Python 3.4 from source, but if you are not familiar with doing it or prefer to install packages using the APT package manager, I would recommend ...


1

Setting (setq python-shell-interpreter "python3") in .emacs should be enough


1

Run the follwing: as mentioned above, you need to apt-get install python-django or python3-django sudo apt-get install python-pip (or sudo apt-get install python3-pip) sudo apt-get install mysql-server (I would suggest you do not use sqlite3 if you want to work with databases) (THIS STEP IS OPTIONAL!!!!) sudo apt-get install apache2 (for django to run on ...


0

Well something must have went wrong during that pip3 install. You can also Django like sudo apt-get install python3-django Cheers [if this helps]


2

I have OpenCV version 3.1 on Ubuntu 16.04 LTS to work with Python 3.5.1. At the latest version it's fixed, try: http://cyaninfinite.com/tutorials/installing-opencv-in-ubuntu-for-python-3/ But I didn't download dev python and OpenCV, I took directly from github: EDIT: Here are the instructions I tested successfully and mentioned in the link above: ...


0

From the comments, it looks like you were trying to use pip3 inside a virtualenv that is set up for Python 2. Note that running virtualenv venv creates a virtualenv named venv for Python 2 by default on Ubuntu if you don't specify the Python version explicitly. In any case, if you want to create a virtualenv for Python 2, run: virtualenv venv # create ...


0

» I need to install some packages with python 3.3 (lxml, ftplib, etc...) and for that I need pip « Then please do dpkg -L python3-pip to know that the python3-pip is /usr/bin/pip3 Installing with pip3 : pip3 install [package]


6

@StarOS' answer (now removed) was correct in that by removing python3, you also removed a lot of critical dependencies needed by your system, and a great many other packages. However, he/she was not correct in recommending you to use Boot-Repair. Instead simply go to the terminal with: sudo apt-get install -f (the -f- option is also written --fix-broken ...


0

Normally you should not set LC_ALL persistently as a global environment variable. If you do that on a desktop, you make the GUIs for setting languages/locales useless. As regards your Python program, you need this line: locale.setlocale(locale.LC_ALL, '') It makes the locale, i.e. the output of the locale command, effective within the Python program.



Top 50 recent answers are included