[Tutor] ubuntu hassles.
eryksun
eryksun at gmail.com
Tue Jan 7 01:40:02 CET 2014
On Mon, Jan 6, 2014 at 11:38 AM, Matthew Ngaha <chigga101 at gmail.com> wrote:
>
> 2) I really need to use virtualenv for python3.2. The problem is
> python3.3 seems to be the default and overrides every virtualenv thing
> i try doing. whether it is pyvenv or virtualenv, the 3.3 version takes
> priority. It is located in /usr/local/bin ... I have no idea where my
> 3.2 virtualenv is located although i know i definately installed it
> with :
> sudo apt-get install python-virtualenv
virtualenv allows you to specify the target Python:
virtualenv --python=/usr/bin/python3.3 myenv
Refer to `man virtualenv` for more options.
FYI, here are some commands to introspect a Debian package in the shell:
apt-cache search virtualenv # find packages
apt-cache show python-virtualenv # description
apt-cache policy python-virtualenv # installed version
apt-file show python-virtualenv # list files
Or use synaptic if you prefer a GUI interface.
> 1) I'm new to ubuntu and someone helped me install python3.3 from
> source. I've tried 'make uninstall' from the dir containing the source
> package but it seems there is no way to get this version off my
> computer.
Ubuntu has a Python 3.3 package. Installation should be simple:
$ sudo apt-get update
$ sudo apt-get install python3.3
If you're building from source, or need to uninstall after a previous
`make install`, use checkinstall to build a package.
Start by installing dependencies.
$ sudo -s
# apt-get update
# apt-get build-dep python3
# apt-get install checkinstall
Change to the source directory to configure and build Python.
# ./configure
# make clean
# make
# make test
Installation defaults to /usr/local. Use the configure option
`--prefix` to target a different directory. Obviously you want to
leave the default if your goal is to uninstall a previous installation
that used the defaults. Refer to `./configure --help` for more
options.
Run checkinstall to create and install a Debian package (-D):
# checkinstall -D --default --fstrans=no\
--pkgname=python3.3-local --pkgversion=3.3.3-1\
make install
Omit `--default` if you don't want the default answers to prompts. In
my experience, filesystem translation (fstrans) has to be disabled to
install Python. Change the last part to `make altinstall` if you want
the major and minor version number used for the files in
/usr/local/bin (e.g. pyvenv-3.3). It's a good idea, but obviously not
if your goal is to uninstall a previous "make install".
When it's finished installing, checkinstall should print the path to
the .deb file and also the command you'll need to uninstall the
package, such as:
# dpkg -r python3.3-local
More information about the Tutor
mailing list