Installing Python on Linux Mint - python-3.x

I have been trying to install python3.3.0 on Linux Mint. After reading the README file, I ran the following commands:
./configure
make
make test
sudo make install
I ran the make test command, but it gave skipped a few tests sayig that it could not find the required modules and gave the following errors:
FAIL: test_urlwithfrag (test.test_urllib2net.OtherNetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/Python-3.3.0/Lib/test/test_urllib2net.py", line 165, in test_urlwithfrag
"http://docs.python.org/glossary.html#glossary")
AssertionError: 'http://docs.python.org/2/glossary.html' != 'http://docs.python.org/glossary.html#glossary'
- http://docs.python.org/2/glossary.html
? --
+ http://docs.python.org/glossary.html#glossary
?
+++++++++
Ran 15 tests in 58.905s
FAILED (failures=1, skipped=1)
test test_urllib2net failed
make: *** [test] Error 1
Please tell me what I need to do to get python working on my system

What are you planning on using Python for? (Reply as a comment)
It is a very bad idea to install a newer version of Python on your system itself, as it could break a lot of functionality of the OS (as the OS is built using a specific version of Python).
I recommend you consider using a tool like:
https://github.com/utahta/pythonbrew (deprecated but still works)
OR
https://github.com/yyuu/pyenv (alternative recommended)
These tools will act like a kind of sandbox and make installing different versions possible without breaking the functionality of the OS.

That bug is reported here.
I had the same error and python3 works fine, however, before you install please install the following dependencies. It will save you many hours of pain that I had to go through trying to get tkinter to work (note that several of the following don't exist, but just go through the motions as I forget which ones aren't relevent anymore):
sudo apt-get install zlib1g-dev
sudo apt-get install build-essential
sudo apt-get install libncursesw5-dev
sudo apt-get install libreadline5-dev
sudo apt-get install libssl-dev
sudo apt-get install libgdbm-dev
sudo apt-get install libc6-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install tk-dev
sudo apt-get install python-support
You will still get the same error about test_urllib2net but it isn't anything that will halt you in the future (at least I don't think so based on the bug report listed above).

Related

difference between wget and apt get

Im trying to install google's tensor flow API and i'm following their instructions on this link to no avail.
after typing the following command:
sudo apt-get install python-pip python-dev
i get:
sudo: apt-get: command not found
I'm new to Linux and i was told there are tow types, red-hat and a nameless parallel, which answers respectively to either wget or apt-get. I was also told i need to adjust the commands. (wget does works)
is this true? What is the accurate difference between wget and apt-get? how do i adjust the commands to my situation?
i'm working with:
SUSE Linux Enterprise server 11 (x86_64)
release 11
Suse Linux has not installed apt-get by default. you should go with zypper:
zypper install python-devel python-pip
apt-get is a packagemanagment system while wget is only good for filetransfer
apt-get is a package manager for Debian distros while SUSE Linux is equipped with zypper.
You can use:
zypper install python-devel python-pip
You can also compile python without using package manager like zypper. Wget is used to download things and is not a package manager. Thus when you will compile, you'll need the package. So you'll use wget.

Still can't install pygame on ubuntu

I've tried three different ways. The most recent was following instructions here: http://www.pygame.org/wiki/CompileUbuntu
But when I type in the first line
sudo apt-get install mercurial python-dev python-numpy ffmpeg \
I am told that
E: Package 'ffmpeg' has no installation candidate.
I continue on with the instructions and I am later told that some of the dependencies are missing (even though those are the ones I had attempted to install moments ago).
Then when I put in
sudo python3 setup.py install
it tells me
src/_pygame.h:80:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
I recently had this problem. Try:
sudo apt-get install python-pygame
If that doesn't work you could try reinstalling python. The following command line will remove all python modules and reinstall python. After that try the command above again. If you have any other downloaded python modules or idles you will need to reinstall them.
sudo apt-get purge python && sudo apt-get install python2.7

ubuntu scipy works for python2.7 but not for 3.2

I have tried many ways to get scipy to play nice with python3.2 but no joy yet.
I have tried:
sudo apt-get build-dep scipy
no joy
and
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
and still no joy
The goal is to get scipy to play nice with ipython running python3.2.
Here is the terminal output.
http://pastebin.com/LkPZUSAX
help / assistance is appreciated.
try:
sudo apt-get install python32-numpy
if you have multiple versions of python installed on your system then you have to specify the version for which you want to install the library..
also you can do
python --version
to check the default python for your system
Try running the command
sudo apt-get install python3.2-numpy
instead.
Running the command
sudo apt-get install python-numpy
installs for python2.7 be default in my case.
So one must specify the python version in apt-get command.

X11/Xlib.h not found in Ubuntu

I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says:
Compile thumb : egl <= cuberenderer.c
In file included from
/path/include/egl.h:36,
from /path/cuberenderer.c:7:
/path/include/eglplatform.h:89:22:
error: X11/Xlib.h: No such file or
directory
/path/include/eglplatform.h:90:23:
error: X11/Xutil.h: No such file or
directory
I'm totally new to GL and have no idea what's wrong.
A quick search using...
apt search Xlib.h
Turns up the package libx11-dev but you shouldn't need this for pure OpenGL programming. What tutorial are you using?
You can add Xlib.h to your system by running the following...
sudo apt install libx11-dev
Presume he's using the tutorial from http://www.arcsynthesis.org/gltut/ along with premake4.3 :-)
sudo apt-get install libx11-dev ................. for X11/Xlib.h
sudo apt-get install mesa-common-dev........ for GL/glx.h
sudo apt-get install libglu1-mesa-dev ..... for GL/glu.h
sudo apt-get install libxrandr-dev ........... for X11/extensions/Xrandr.h
sudo apt-get install libxi-dev ................... for X11/extensions/XInput.h
After which I could build glsdk_0.4.4 and examples without further issue.
Why not try find /usr/include/X11 -name Xlib.h
If there is a hit, you have Xlib.h
If not install it using sudo apt-get install libx11-dev
and you are good to go :)

How to install Go

I want to install Go. I prepared system for support language. But sadly, I can't find Bison and libc6-dev following this command.
sudo apt-get install bison ed gawk gcc libc6-dev make
Then I still can't find the suitable Mercurial for Ubuntu 8.10, which is followed this command.
apt-get install python-setuptools python-dev build-essential
Therefore everyone please guide what I should do in order to install Go completely. My OS is Ubuntu version 8.10. Notice you can post the direct link for me to get packets/files.
Mercurial can typically be installed with
sudo apt-get install mercurial
The package is in universe, which you may not have enabled. The full guide, if you need it, is available here:
https://help.ubuntu.com/community/Mercurial
After installing setuptools et al., the go installation instructions say that you should install mercurial with easy-install, i.e. sudo easy_install mercurial. Are you having trouble with easy_install?
In order to install go with Homebrew run the following command on the terminal:
$ brew install golang
To check the version of go run the following command:
$ go version
To see the location run:
$ which go
To uninstall go :
$ sudo apt-get remove golang-go

Resources