I want to install python-xml package on ubuntu.  I see this command for installing it:  sudo apt-get install python-xml   but  $ sudo apt-get install python-xmlReading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package python-xml   Should I add repository to fix it?
122135
I'd like to use etree, expat or similar, though I understood etree is easier to use. But how do I install that when I already have Python 2.7.2 installed on Ubuntu 11.10?  All documentation I can find through Google suggests that xml parsing is available by default for Python. Or at least when I search for install xml parser python, or any combination of similar words, also including etree or expat I can't find what steps to take (a commandline install method).
107466
I have played around a lot with my Python installations (2 and 3) and installed a bunch of packages, some using apt-get, but most using pip. I have also upgraded many apt-installed packages with pip to a newer version.  My question is: How can I reverse all those changes, remove all pip-installed Python packages and just keep the default set of preinstalled packages in their default repository version, plus those installed by apt-get but only as dependency of other software, always downgrading to the repository version if necessary.  I want to do this to have a tidied up Python environment for the system and have my modifications in virtualenvs only.  Is that possible without a system reinstall? How would I approach it?
52885
I'm trying to download source code of certain packages, for example rhythmbox, for learning purposes. I want to do this through apt-get, with the apt-get source command.  For some reason, apt-get can't seem to find any package. I've tried several packages, and I keep getting this output from apt-get:  $ apt-get source rhythmbox Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to find a source package for rhythmbox   I've been searching for answers for quite some time now, but I can't find anyone with the same issue. apt-get works fine with installing and updating so apt-get works fine in my opinion. During the search I also learned that I had to enable the 'source code repositories' in Software Sources, so that's also enabled.  I am aware of the fact that (maybe only for certain packages, not sure) source packages can also be downloaded with bzr from Launchpad, but I want to know why this method won't work.
34235
I have a single python script that I want to distribute as a deb package. It is a  which shows local date in Unity panel. I did follow  but I could not create a deb package because it fails.   Can someone give me a step-by-step instruction on what I should do? As far as I know this script depends on python-appindicator.   NOTE: I do not want any links to Debian/Ubuntu packaging instructions. I have seen most of them. I don't find them beginner friendly.
52275
There are many  about Unable to locate package.  For example : if user try to install package by using apt-get then the following error shown. (Here package is used only as example for displaying error message):  sudo apt-get install package Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package package   What does this error mean? How do I solve it?    provided General solution to understand and how to solve such type of error (which is helpful for new users that may unaware of repository-apt install mechanism)  Note : For resolving unmet-dependencies, visit: .
102518
Yes, I'm a moron, and I tried to manually install a higher point release of python 2.7.16 to /usr/bin/  (i did ./configure --prefix=/usr) on my Ubuntu 16.04 machine. It seems to work fine EXCEPT for packages that depended on python, like apt-listchanges, which fails with messages like ImportError: No module named apt_pkg  there's no make uninstall available, I've tried manually removing files, and still when I try apt --reinstall install python, Nothing gets overwritten and the python executable still gives the new 2.7.16 version...   Any idea how to get the official repository version back??
116285
I understand that in Ubuntu 14.04, you have access to both python 2.7.6 and python 3.4.0. When getting python packages through the command line, how do I make sure that I am installing packages meant for python 2.7.6 and not for python 3.4.0?
47597
I'm trying install the requests, but I can't do that. I'm using Ubuntu 16.04  I tried to install using  $ sudo pip install requests   and I get the following error   Collecting requests Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main     status = self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run     requirement_set.prepare_files(finder)   File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files     ignore_dependencies=self.ignore_dependencies))   File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file     finder, self.upgrade, require_hashes)   File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link     self.link = finder.find_requirement(self, upgrade)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement     all_candidates = self.find_all_candidates(req.name)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates     for page in self._get_pages(url_locations, project_name):   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages     page = self._get_page(location)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page     return HTMLPage.get_page(link, session=self.session)   File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page     "Cache-Control": "max-age=600",   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get     return self.request('GET', url, **kwargs)   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request     return super(PipSession, self).request(method, url, *args, **kwargs)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request     resp = self.send(prep, **send_kwargs)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 597, in send     history = [resp for resp in gen] if allow_redirects else []   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 195, in resolve_redirects     **adapter_kwargs   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send     r = adapter.send(request, **kwargs)   File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send     resp = super(CacheControlAdapter, self).send(request, **kw)   File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send     timeout=timeout   File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen     _stacktrace=sys.exc_info()[2])   File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment     total -= 1 TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'   My python version is the 2.7 and the pip is 8.1.1
61461
I have downloaded Python 3.3 from the official site but no idea how to install it.   I'm using Ubuntu 12.04
77933
I am completely new to linux and hence Ubuntu. Though i have been using the Ubuntu OS on my system for a while, it is for the first time I am trying to learn the nuances and hence starting with the documentation.  I am wondering , if we use apt-get command to install packages, what does apt-get install aptitude do ?
66050
I am trying to install the Epson scanner driver... I have extracted the tar.gz. file but on ./configure shows the error  checking for GIMP - version &gt;= 1.0.0... checking for gimp-config... no no checking for XML... configure: error: Package requirements (libxml-2.0) were not met:  No package 'libxml-2.0' found  Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.  Alternatively, you may set the environment variables XML_CFLAGS and XML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details."
10660
I have python3 installed in Ubuntu 18.04 and I want to use different modules of python. Can anyone tell me how to install them?
74234
I have been through the process of installing matplotlib on my Ubuntu 12.04 computer. However, when I try to run a test program, I get the following error:   Traceback (most recent call last):   File "../py33/test.py", line 2, in &lt;module&gt;     import matplotlib.pyplot as plt ImportError: No module named 'matplotlib'   I am trying a sample program from matplotlib's website (basic_example). I just don't understand why it says there is not module matplotlib, even though I have definitely installed it (using sudo apt-get install python-matplotlib, and have done sudo apt-get build-dep python-matplotlib; I also tried pip install matplotlib, as I was told to do that, after installing Python itself, if I wanted to install other binaries).
378
Say, I have foo-1.2.3.deb which depends on perl and python, however, running command:  dpkg -i ./foo-1.2.3.deb   won't install these dependencies. So I must apt-get install perl python by hand.  How to make dpkg -i install these dependencies for me automatically?
97307
I keep getting this: Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   geoip-database-extra gir1.2-ayatanaappindicator3-0.1 gir1.2-gexiv2-0.10   libayatana-appindicator3-1 libayatana-indicator3-7 libjs-openlayers libnl-route-3-200   libqt5multimedia5 libsmi2ldbl libwireshark-data libwireshark10 libwiretap7 libwscodecs1   libwsutil8 python-bs4 python-certifi python-configobj python-html5lib python-httplib2   python-lxml python-olefile python-openssl python-pil python-pycurl python-requests   python-urllib3 python-webencodings wireshark wireshark-common wireshark-qt Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up install-info (6.5.0.dfsg.1-2) ... /usr/sbin/update-info-dir: 4: /etc/environment: Syntax error: Unterminated quoted string dpkg: error processing package install-info (--configure):  installed install-info package post-installation script subprocess returned error exit status 2 Errors were encountered while processing:  install-info E: Sub-process /usr/bin/dpkg returned an error code (1)  Output of cat /etc/environment: PATH=&quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jre1.8.0_171/bin&quot;     JAVA_HOME=&quot;/usr/java/jre1.8.0_171
18500
Hi I am unable to download a python module dm.smlsec.binding 1.0b3. The following error is what I get. I have attached my log file please help me sorting out  ------------------------------------------------------------ /usr/local/bin/pip run on Thu Jul 18 12:23:36 2013 Downloading/unpacking dm.xmlsec.binding Running setup.py egg_info for package dm.xmlsec.binding Traceback (most recent call last):   File "&lt;string&gt;", line 16, in &lt;module&gt;   File "/tmp/pip-build-student/dm.xmlsec.binding/setup.py", line 199, in &lt;module&gt;     **setupArgs   File "/usr/lib/python2.7/distutils/core.py", line 112, in setup     _setup_distribution = dist = klass(attrs)   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 260, in __init__   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 284, in fetch_build_eggs   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 569, in resolve     dist = best.get(req.key) pkg_resources.VersionConflict: (lxml 2.3.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('lxml&gt;=3.0')) Complete output from command python setup.py egg_info: Traceback (most recent call last):   File "&lt;string&gt;", line 16, in &lt;module&gt;   File "/tmp/pip-build-student/dm.xmlsec.binding/setup.py", line 199, in &lt;module&gt;     **setupArgs   File "/usr/lib/python2.7/distutils/core.py", line 112, in setup     _setup_distribution = dist = klass(attrs)   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 260, in __init__   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 284, in fetch_build_eggs   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 569, in resolve     dist = best.get(req.key) pkg_resources.VersionConflict: (lxml 2.3.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('lxml&gt;=3.0')) ----------------------------------------  Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-student/dm.xmlsec.binding  Exception information: Traceback (most recent call last):   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main     status = self.run(options, args)   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1057, in prepare_files     req_to_install.run_egg_info()   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 236, in run_egg_info     command_desc='python setup.py egg_info')   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 662, in call_subprocess     % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-student/dm.xmlsec.binding
55684
I am using Ubuntu 14.04 64 bit Operating System .   I installed Beautiful Soup 4 using this command :  sudo apt-get install python-bs4   With Python 2.7.6 , I had no difficulty importing the bs4 module. But when I used Python 3.4.0 it showed me this error.  &gt;&gt;&gt;import bs4 Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt; ImportError: No module named 'bs4'   I also tried to install it using pip.  sudo pip install beautifulsoup4   But again it didn't worked with Python 3.4.0.  Right now I have uninstalled pip and also uninstalled Beautiful Soup 4   sudo apt-get remove python-bs4 sudo apt-get remove python-pip   What should I do next to properly install Beautiful Soup 4 for both  Python 2.7.6 and Python 3.4.0 ??