0

I am running Ubuntu 12.10 that has python 2.7 as its default. I have installed python 3.3 in /opt/python3.3 (using ./configure --prefix=/opt/python3.3). My problem is with the virtual environment. Created one in ~/python33 and activated it. Now after downloading, when I run distribute_setup.py within the venv, the installation defaults to 2.7. And this happens with all the subsequent easy_installs. For reference, here are the final few prompts:

Extracting distribute-0.6.35-py2.7.egg to /usr/local/lib/python2.7/dist-packages
...
Installed /usr/local/lib/python2.7/dist-packages/distribute-0.6.35-py2.7.egg

I created a symlink pointing to /opt/python3.3/bin/python3 as ~/bin/python33 and tried running distribute_setup.py with this executable. I tried this from within the venv and without. :). But this is what I get for both:

Extracting in /tmp/tmpl3ackg
Traceback (most recent call last):
  File "distribute_setup.py", line 546, in <module>
    sys.exit(main())
  File "distribute_setup.py", line 543, in main
    return _install(tarball, _build_install_args(options))
  File "distribute_setup.py", line 76, in _install
    tar = tarfile.open(tarball)
  File "/opt/python3.3/lib/python3.3/tarfile.py", line 1571, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

And got the same result with :

sudo /opt/python3.3/bin/python3 distribute_setup.py

~/python33/lib/python3.3/site-packages is empty.

Thanks for your help.

ankostis
  • 235
  • 2
  • 11

1 Answers1

0

For installing python 3.3 correctly just do this in the terminal.

sudo apt-get install python3.3-minimal

And for using it you can run:

python3.3
Thomas15v
  • 1,593
  • I wanted to make sure that the new version does not create any problems for the default 2.7. So I followed the suggestion offered in this forum which seems to have worked for many. I am referring to this: link. So should I be worried about that if I run an apt-get install on python3 – JunkMechanic Mar 31 '13 at 10:51
  • Moreover, when I tried the suggested command, it prompted that python 3 is already installed on the system. This is obvious as ubuntu 12.10 ships with python 3.2 library under the bracket python 3 and I guess this is not to do with the python 3.3 installation in /opt/python3.3. So no luck there. – JunkMechanic Mar 31 '13 at 16:47
  • Sorry i thought you want to have python3. But for the 3.3 you can use the new command. – Thomas15v Mar 31 '13 at 17:26