【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

编译打包和其他
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#1

帖子 iorikyox » 2014-10-20 10:40

为了运行某些程序,自行安装了python2.7.8:

代码: 全选

$ ./configure --prefix=/usr/include
$ make
$ sudo checkinstall
然后,python2.7文件夹出现在/usr/include/bin、/usr/include/liclude和/usr/include/lib中,

输入

代码: 全选

$ python --version
python 2.6.5
但是,却出现如下提示:
[text]
$ sudo apt-get autoremove
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
您也许需要运行“apt-get -f install”来修正上面的错误。
下列软件包有未满足的依赖关系:
command-not-found: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
computer-janitor: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
computer-janitor-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
gdebi: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
gdebi-core: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
jockey-common: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
lsb-release: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
nvidia-common: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-appindicator: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-apport: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-apt: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-aptdaemon: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-aptdaemon-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-brlapi: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-cairo: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-crypto: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-cups: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-dbus: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-egenix-mxdatetime: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-egenix-mxtools: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-farsight: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gconf: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gdbm: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-glade2: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gmenu: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gnome2: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gnomeapplet: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gnomecanvas: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gnomekeyring: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gobject: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gst0.10: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gtk2: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gtksourceview2: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-gtkspell: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-imaging: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-indicate: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-launchpad-integration: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-libxml2: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-newt: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-notify: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-openssl: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-pam: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-pkg-resources: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-problem-report: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-pycurl: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-pygoocanvas: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-pyorbit: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-rdflib: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-setuptools: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-simplejson: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-smbc: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-software-properties: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-twisted-bin: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-twisted-core: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-virtkey: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-vte: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-webkit: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-wnck: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-xapian: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
python-zope.interface: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
screen-resolution-extra: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
software-properties-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
ufw: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
update-manager: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装
update-manager-core: 依赖: python (< 2.7) 但是 2.7.8-1 已经安装

E: 不能满足依赖关系。不妨试一下 -f 选项。
[/text]
请教,现状下,该如何恢复系统正常?谢谢了。

感谢网友 poloshiao 的帮忙。
这个错误不是自己第一次遇到了,上一次莽撞的重装了系统,然后这次很小心的在之前安装了很多预备软件,并且,python2.7.8并没有替换掉原来的python2.6.5,自己搜索了“10.04 back python2.6.5”,找到了页面http://ubuntuforums.org/showthread.php?t=1506622,按照其中的命令

代码: 全选

$ sudo aptitude install python
终于恢复了系统默认的python2.6.5。[/size]
上次由 iorikyox 在 2014-10-20 19:40,总共编辑 4 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#2

帖子 poloshiao » 2014-10-20 11:12

0. 暫時先不移除
1. ubuntu 10.04 並沒有 python 2.7 只有 python 2.6
2. 如果希望安裝 python 2.7
參考
http://askubuntu.com/a/26002/198920
加上 ppa
deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
3. 也可以直接下載 deb 來安裝
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#3

帖子 iorikyox » 2014-10-20 11:27

[text]
yhl@yhl-laptop:~$ cd /home/yhl/Python-2.7.8
yhl@yhl-laptop:~/Python-2.7.8$ ./configure --prefix=/usr/include
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure: WARNING:

By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line.

checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for --with-suffix...
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for GNU ld... yes
checking for --enable-shared... no
checking for --enable-profiling... no
checking LDLIBRARY... libpython$(VERSION).a
checking for ranlib... ranlib
checking for ar... ar
checking for svnversion... not-found
checking for hg... not-found
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for --with-pydebug... no
checking whether gcc accepts -fno-strict-aliasing... yes
checking whether gcc accepts -OPT:Olimit=0... no
checking whether gcc accepts -Olimit 1500... no
checking whether gcc supports ParseTuple __format__... no
checking whether pthreads are available without options... no
checking whether gcc accepts -Kpthread... no
checking whether gcc accepts -Kthread... no
checking whether gcc accepts -pthread... yes
checking whether g++ also accepts flags for thread support... yes
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking sys/bsdtty.h usability... no
checking sys/bsdtty.h presence... no
checking for sys/bsdtty.h... no
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/lock.h usability... no
checking sys/lock.h presence... no
checking for sys/lock.h... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/stat.h... (cached) yes
checking sys/termio.h usability... no
checking sys/termio.h presence... no
checking for sys/termio.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking bluetooth.h usability... no
checking bluetooth.h presence... no
checking for bluetooth.h... no
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
checking linux/tipc.h usability... yes
checking linux/tipc.h presence... yes
checking for linux/tipc.h... yes
checking spawn.h usability... yes
checking spawn.h presence... yes
checking for spawn.h... yes
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether sys/types.h defines makedev... yes
checking for linux/netlink.h... yes
checking for clock_t in time.h... yes
checking for makedev... yes
checking Solaris LFS bug... no
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for uint32_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint64_t... yes
checking for int32_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int64_t... yes
checking for ssize_t... yes
checking size of int... 4
checking size of long... 4
checking size of void *... 4
checking size of short... 2
checking size of float... 4
checking size of double... 8
checking size of fpos_t... 16
checking size of size_t... 4
checking size of pid_t... 4
checking for long long support... yes
checking size of long long... 8
checking for long double support... yes
checking size of long double... 12
checking for _Bool support... yes
checking size of _Bool... 1
checking for uintptr_t... yes
checking size of uintptr_t... 4
checking size of off_t... 8
checking whether to enable large file support... yes
checking size of time_t... 4
checking for pthread_t... yes
checking size of pthread_t... 4
checking for --enable-toolbox-glue... no
checking for --enable-framework... no
checking for dyld... no
checking SO... .so
checking LDSHARED... $(CC) -shared
checking CCSHARED... -fPIC
checking LINKFORSHARED... -Xlinker -export-dynamic
checking CFLAGSFORSHARED...
checking SHLIBS... $(LIBS)
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for library containing sem_init... -lpthread
checking for textdomain in -lintl... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for pkg-config... /usr/bin/pkg-config
checking for --with-system-expat... no
checking for --with-system-ffi... no
checking for --with-tcltk-includes... default
checking for --with-tcltk-libs... default
checking for --with-dbmliborder...
checking for --with-signal-module... yes
checking for --with-dec-threads... no
checking for --with-threads... yes
checking if PTHREAD_SCOPE_SYSTEM is supported... yes
checking for pthread_sigmask... yes
checking for pthread_atfork... yes
checking if --enable-ipv6 is specified... yes
checking if RFC2553 API is available... yes
checking ipv6 stack type... linux-glibc
checking for OSX 10.5 SDK or later... no
checking for --with-doc-strings... yes
checking for --with-tsc... no
checking for --with-pymalloc... yes
checking for --with-valgrind... no
checking for --with-wctype-functions... no
checking for dlopen... yes
checking DYNLOADFILE... dynload_shlib.o
checking MACHDEP_OBJS... MACHDEP_OBJS
checking for alarm... yes
checking for setitimer... yes
checking for getitimer... yes
checking for bind_textdomain_codeset... yes
checking for chown... yes
checking for clock... yes
checking for confstr... yes
checking for ctermid... yes
checking for execv... yes
checking for fchmod... yes
checking for fchown... yes
checking for fork... yes
checking for fpathconf... yes
checking for ftime... yes
checking for ftruncate... yes
checking for gai_strerror... yes
checking for getgroups... yes
checking for getlogin... yes
checking for getloadavg... yes
checking for getpeername... yes
checking for getpgid... yes
checking for getpid... yes
checking for getpriority... yes
checking for getresuid... yes
checking for getresgid... yes
checking for getpwent... yes
checking for getspnam... yes
checking for getspent... yes
checking for getsid... yes
checking for getwd... yes
checking for initgroups... yes
checking for kill... yes
checking for killpg... yes
checking for lchmod... no
checking for lchown... yes
checking for lstat... yes
checking for mkfifo... yes
checking for mknod... yes
checking for mktime... yes
checking for mmap... yes
checking for mremap... yes
checking for nice... yes
checking for pathconf... yes
checking for pause... yes
checking for plock... no
checking for poll... yes
checking for pthread_init... no
checking for putenv... yes
checking for readlink... yes
checking for realpath... yes
checking for select... yes
checking for sem_open... yes
checking for sem_timedwait... yes
checking for sem_getvalue... yes
checking for sem_unlink... yes
checking for setegid... yes
checking for seteuid... yes
checking for setgid... yes
checking for setlocale... yes
checking for setregid... yes
checking for setreuid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setuid... yes
checking for setvbuf... yes
checking for snprintf... yes
checking for setlocale... (cached) yes
checking for setregid... (cached) yes
checking for setreuid... (cached) yes
checking for setresuid... yes
checking for setresgid... yes
checking for setsid... (cached) yes
checking for setpgid... (cached) yes
checking for setpgrp... (cached) yes
checking for setuid... (cached) yes
checking for setvbuf... (cached) yes
checking for snprintf... (cached) yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sigrelse... yes
checking for strftime... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for tempnam... yes
checking for timegm... yes
checking for times... yes
checking for tmpfile... yes
checking for tmpnam... yes
checking for tmpnam_r... yes
checking for truncate... yes
checking for uname... yes
checking for unsetenv... yes
checking for utimes... yes
checking for waitpid... yes
checking for wait3... yes
checking for wait4... yes
checking for wcscoll... yes
checking for _getpty... no
checking for chroot... yes
checking for link... yes
checking for symlink... yes
checking for fchdir... yes
checking for fsync... yes
checking for fdatasync... yes
checking for epoll... yes
checking for kqueue... no
checking for ctermid_r... no
checking for flock declaration... yes
checking for flock... yes
checking for getpagesize... yes
checking for broken unsetenv... no
checking for true... true
checking for inet_aton in -lc... yes
checking for chflags... no
checking for lchflags... no
checking for inflateCopy in -lz... yes
checking for hstrerror... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for setgroups... yes
checking for openpty... no
checking for openpty in -lutil... yes
checking for forkpty... yes
checking for memmove... yes
checking for fseek64... no
checking for fseeko... yes
checking for fstatvfs... yes
checking for ftell64... no
checking for ftello... yes
checking for statvfs... yes
checking for dup2... yes
checking for getcwd... yes
checking for strdup... yes
checking for getpgrp... yes
checking for setpgrp... (cached) yes
checking for gettimeofday... yes
checking for major... yes
checking for getaddrinfo... yes
checking getaddrinfo bug... no
checking for getnameinfo... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_flags... no
checking for struct stat.st_gen... no
checking for struct stat.st_birthtime... no
checking for struct stat.st_blocks... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking for addrinfo... yes
checking for sockaddr_storage... yes
checking whether char is unsigned... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for socketpair... yes
checking if sockaddr has sa_len member... no
checking whether va_list is an array... no
checking for gethostbyname_r... yes
checking gethostbyname_r with 6 args... yes
checking for __fpu_control... yes
checking for --with-fpectl... no
checking for --with-libm=STRING... default LIBM="-lm"
checking for --with-libc=STRING... default LIBC=""
checking whether C doubles are little-endian IEEE 754 binary64... yes
checking whether C doubles are big-endian IEEE 754 binary64... no
checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no
checking whether we can use gcc inline assembler to get and set x87 control word... yes
checking for x87-style double rounding... yes
checking whether tanh preserves the sign of zero... yes
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for copysign... yes
checking for erf... yes
checking for erfc... yes
checking for expm1... yes
checking for finite... yes
checking for gamma... yes
checking for hypot... yes
checking for lgamma... yes
checking for log1p... yes
checking for round... yes
checking for tgamma... yes
checking whether isinf is declared... yes
checking whether isnan is declared... yes
checking whether isfinite is declared... yes
checking whether POSIX semaphores are enabled... yes
checking for broken sem_getvalue... no
checking digit size for Python's longs... no value specified
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking size of wchar_t... 4
checking for UCS-4 tcl... no
checking whether wchar_t is signed... yes
checking what type to use for unicode... unsigned short
checking whether byte ordering is bigendian... no
checking whether right shift extends the sign bit... yes
checking for getc_unlocked() and friends... yes
checking how to link readline libs... none
checking for rl_callback_handler_install in -lreadline... no
checking for rl_pre_input_hook in -lreadline... no
checking for rl_completion_display_matches_hook in -lreadline... no
checking for rl_completion_matches in -lreadline... no
checking for broken nice()... no
checking for broken poll()... no
checking for struct tm.tm_zone... (cached) yes
checking for working tzset()... yes
checking for tv_nsec in struct stat... yes
checking for tv_nsec2 in struct stat... no
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking for term.h... no
checking whether mvwdelch is an expression... no
checking whether WINDOW has _flags... no
checking for is_term_resized... no
checking for resize_term... no
checking for resizeterm... no
configure: checking for device files
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for %lld and %llu printf() format support... yes
checking for %zd printf() format support... yes
checking for socklen_t... yes
checking for build directories... done
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup
creating Modules/Setup.local
creating Makefile
[/text]
上次由 iorikyox 在 2014-10-20 19:21,总共编辑 3 次。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#4

帖子 iorikyox » 2014-10-20 11:34

poloshiao 写了:0. 暫時先不移除
1. ubuntu 10.04 並沒有 python 2.7 只有 python 2.6
2. 如果希望安裝 python 2.7
參考
http://askubuntu.com/a/26002/198920
加上 ppa
deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
3. 也可以直接下載 deb 來安裝
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
首先,感谢你的回复。

我现在确实还没完全安装python2.7.8,但是,系统认为我已经安装了,并且,synaptic和software-center现在都无法安装卸载软件,你提出的更新source问题一样无法执行。

现在我需要系统默认回python2.6.5,让软件们恢复正常。

virtualenv我也已经装好了,但是运行说明页面的命令时,提示无效。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#5

帖子 iorikyox » 2014-10-20 11:44

poloshiao 写了:0. 暫時先不移除
1. ubuntu 10.04 並沒有 python 2.7 只有 python 2.6
2. 如果希望安裝 python 2.7
參考
http://askubuntu.com/a/26002/198920
加上 ppa
deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
3. 也可以直接下載 deb 來安裝
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
这次万幸,之前安装好了virtualenv,但是没想到还是遇到了同样的系统问题。按照你的帮助,我执行了以下操作,提示成功:

代码: 全选

yhl@yhl-laptop:~/my_env$ virtualenv --no-site-packages --python=/usr/include/bin/python2.7 .
Running virtualenv with interpreter /usr/include/bin/python2.7
New python executable in ./bin/python2.7
Also creating executable in ./bin/python
Installing setuptools, pip...done.
yhl@yhl-laptop:~/my_env$ python --version
Python 2.6.5
yhl@yhl-laptop:~/my_env$ source bin/activate
(my_env)yhl@yhl-laptop:~/my_env$ python --version
Python 2.7.8
现在重启看看,软件依赖的错误提醒是否能够解决。
上次由 iorikyox 在 2014-10-20 19:22,总共编辑 1 次。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#6

帖子 iorikyox » 2014-10-20 11:55

重启无效,还是需要先恢复系统默认的python2.6.5

我现在synaptic内,默认的python已经是2.7.8了,但是terminal中查看版本,还是2.6.5
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#7

帖子 iorikyox » 2014-10-20 12:04

[text]
yhl@yhl-laptop:~$ cd /home/yhl/my_env
yhl@yhl-laptop:~/my_env$ python --version
Python 2.6.5
yhl@yhl-laptop:~/my_env$ virtualenv --no-site-packages --python=/usr/include/bin/python2.7 .
Running virtualenv with interpreter /usr/include/bin/python2.7
New python executable in ./bin/python2.7
Not overwriting existing python script ./bin/python (you must use ./bin/python2.7)
Installing setuptools, pip...done.
yhl@yhl-laptop:~/my_env$ python --version
Python 2.6.5
yhl@yhl-laptop:~/my_env$
yhl@yhl-laptop:~/my_env$ cd
yhl@yhl-laptop:~$ sudo apt-get install -f
[sudo] password for yhl:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在更正依赖关系... 完成
下列软件包是自动安装的并且现在不需要了:
ibus-pinyin-db-open-phrase pinyin-database
使用'apt-get autoremove'来删除它们
下列软件包将被【卸载】:
alacarte apport apport-gtk apt-xapian-index aptdaemon apturl apturl-common
byobu checkbox-gtk command-not-found computer-janitor computer-janitor-gtk
desktopcouch evolution-couchdb gdebi gdebi-core gedit gnome-about
gnome-applets gnome-codec-install gnome-control-center gnome-doc-utils
gnome-mag gnome-menus gnome-orca gnome-panel gnome-session gnome-sudoku
gnome-user-guide gnome-user-guide-en gwibber gwibber-service hplip ibus
ibus-m17n ibus-pinyin ibus-table ibus-table-wubi indicator-applet
indicator-applet-session indicator-me jockey-common jockey-gtk
language-selector language-selector-common language-support-input-zh-hans
launchpad-integration libpurple-bin lsb-release network-manager
network-manager-gnome nvidia-common onboard pitivi python-appindicator
python-apport python-apt python-aptdaemon python-aptdaemon-gtk python-avahi
python-brlapi python-cairo python-crypto python-cups python-dbus
python-debian python-desktopcouch python-desktopcouch-records
python-egenix-mxdatetime python-egenix-mxtools python-farsight python-gconf
python-gdbm python-glade2 python-gmenu python-gnome2 python-gnomeapplet
python-gnomecanvas python-gnomekeyring python-gobject python-gst0.10
python-gtk2 python-gtksourceview2 python-gtkspell python-ibus python-imaging
python-indicate python-launchpad-integration python-launchpadlib
python-lazr.restfulclient python-lazr.uri python-libxml2 python-newt
python-notify python-openssl python-pam python-papyon python-pip
python-pkg-resources python-problem-report python-pyatspi python-pycurl
python-pygoocanvas python-pyorbit python-rdflib python-setuptools
python-simplejson python-smbc python-software-properties python-telepathy
python-twisted-bin python-twisted-core python-twisted-names
python-twisted-web python-virtkey python-vte python-wadllib python-webkit
python-wnck python-xapian python-zope.interface screen-resolution-extra
software-center software-properties-gtk system-config-printer-common
system-config-printer-gnome system-config-printer-udev telepathy-butterfly
ubuntu-desktop ubuntu-docs ubuntu-minimal ubuntu-standard
ubuntu-system-service ufw unattended-upgrades update-manager
update-manager-core update-notifier update-notifier-common
usb-creator-common usb-creator-gtk yelp
升级了 0 个软件包,新安装了 0 个软件包,要卸载 142 个软件包,有 0 个软件包未被升级。
解压缩后将会空出 440MB 的空间。
您希望继续执行吗?[Y/n]n
中止执行。
[/text]
上次由 iorikyox 在 2014-10-20 19:24,总共编辑 3 次。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 请教,ubuntu10.04下,如何卸载python2.7.8?

#8

帖子 iorikyox » 2014-10-20 12:17

终于解决了,哈哈。

参考http://ubuntuforums.org/showthread.php?t=1506622,使用系统软件降级命令还原默认python2.6.5。

[text]
yhl@yhl-laptop:~$ sudo aptitude install python
[sudo] password for yhl:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在初始化软件包状态... 完成
正在编辑扩展状态信息... 完成
下列软件包是“破损”的:
command-not-found computer-janitor computer-janitor-gtk gdebi gdebi-core
jockey-common lsb-release nvidia-common python-appindicator python-apport
python-apt python-aptdaemon python-aptdaemon-gtk python-brlapi
python-cairo python-crypto python-cups python-dbus
python-egenix-mxdatetime python-egenix-mxtools python-farsight
python-gconf python-gdbm python-glade2 python-gmenu python-gnome2
python-gnomeapplet python-gnomecanvas python-gnomekeyring python-gobject
python-gst0.10 python-gtk2 python-gtksourceview2 python-gtkspell
python-imaging python-indicate python-launchpad-integration
python-libxml2 python-newt python-notify python-openssl python-pam
python-pkg-resources python-problem-report python-pycurl
python-pygoocanvas python-pyorbit python-rdflib python-setuptools
python-simplejson python-smbc python-software-properties
python-twisted-bin python-twisted-core python-virtkey python-vte
python-webkit python-wnck python-xapian python-zope.interface
screen-resolution-extra software-properties-gtk ufw update-manager
update-manager-core
0 个软件包被升级,新安装 0 个, 0 个将被删除, 同时 0 个将不升级。
需要获取 0B 的存档。 解包后将要使用 0B。
下列软件包存在未满足的依赖关系:
python-crypto: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-twisted-core: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-pygoocanvas: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
computer-janitor-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gst0.10: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
update-manager: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gnome2: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-notify: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-zope.interface: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-software-properties: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gnomecanvas: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
gdebi: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
command-not-found: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-aptdaemon-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
update-manager-core: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-aptdaemon: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-pycurl: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-libxml2: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gtksourceview2: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-newt: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-apt: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-virtkey: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-pyorbit: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
gdebi-core: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gconf: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-simplejson: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
computer-janitor: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gtkspell: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
jockey-common: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-pam: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-openssl: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-webkit: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-imaging: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-farsight: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-glade2: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-brlapi: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-vte: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-xapian: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-smbc: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-dbus: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-problem-report: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gnomeapplet: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-appindicator: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-launchpad-integration: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gnomekeyring: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
ufw: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
software-properties-gtk: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-setuptools: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-egenix-mxdatetime: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gdbm: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-cups: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
screen-resolution-extra: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
nvidia-common: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-egenix-mxtools: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-pkg-resources: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gmenu: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-wnck: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-apport: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-twisted-bin: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
lsb-release: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gtk2: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-cairo: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-rdflib: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-gobject: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
python-indicate: 依赖: python (< 2.7) 但是 2.7.8-1 已安装。
下列动作将解决这些依赖关系:

降级 下列软件包:
python [2.7.8-1 (now) -> 2.6.5-0ubuntu1.1 (lucid-updates)]

分数是 86

是否接受该解决方案?[Y/n/q/?] y
下列软件包将被“降级”:
python
0 个软件包被升级,新安装 0 个, 1 个被降级, 0 个将被删除, 同时 0 个将不升级。
需要获取 0B/148kB 的存档。 解包后将释放 92.5MB。
您要继续吗?[Y/n/?] y
正在编辑扩展状态信息... 完成
dpkg:警告:即将把 python 从 2.7.8-1 降级到 2.6.5-0ubuntu1.1。
(正在读取数据库 ... 系统当前总共安装有 131963 个文件和目录。)
正预备替换 python 2.7.8-1 (使用 .../python_2.6.5-0ubuntu1.1_all.deb) ...
正在解压缩将用于更替的包文件 python ...
正在处理用于 man-db 的触发器...
正在处理用于 doc-base 的触发器...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
正在设置 python (2.6.5-0ubuntu1.1) ...

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
正在读取扩展状态文件
正在初始化软件包状态... 完成

当前状态:0 个被破坏 [-65]。
yhl@yhl-laptop:~$ sudo apt-get upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
yhl@yhl-laptop:~$
[/text]
上次由 iorikyox 在 2014-10-20 19:39,总共编辑 5 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#9

帖子 poloshiao » 2014-10-20 14:38

恭喜你

補充
参考http://ubuntuforums.org/showthread.php?t=1506622,使用系统软件降级命令还原默认python2.6.5。
這是 從 2.7.8 降級為 2.6.5
python --version
Python 2.7.8
现在重启看看,软件依赖的错误提醒是否能够解决。
2. 如果希望安裝 python 2.7
參考
http://askubuntu.com/a/26002/198920
加上 ppa
deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
3. 也可以直接下載 deb 來安裝
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
這是 從 2.7.8 降級為 2.7.6

如果你還是需要 Python 2.7.6
可以再試試
有問題 歡迎再貼文
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#10

帖子 iorikyox » 2014-10-20 15:58

poloshiao 写了:恭喜你

補充
参考http://ubuntuforums.org/showthread.php?t=1506622,使用系统软件降级命令还原默认python2.6.5。
這是 從 2.7.8 降級為 2.6.5
python --version
Python 2.7.8
现在重启看看,软件依赖的错误提醒是否能够解决。
2. 如果希望安裝 python 2.7
參考
http://askubuntu.com/a/26002/198920
加上 ppa
deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu lucid main
3. 也可以直接下載 deb 來安裝
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
這是 從 2.7.8 降級為 2.7.6

如果你還是需要 Python 2.7.6
可以再試試
有問題 歡迎再貼文
感谢回复。

1.重启电脑以后,不知为何,virtualenv 下,python版本回到了2.6.5版,terminal信息请看5楼。

2.在恢复2.6.5以后,按照给出的链接教程,在进行到这一步骤时,提示页面“can't host”

代码: 全选

yhl@yhl-laptop:~$ curl -O http://python-distribute.org/distribute_setup.py

curl: (6) Couldn't resolve host 'python-distribute.org'
3.按照教程,更新software source后,install python2.7 python2.7-dev,默认安装在与2.6.5相同目录中。但是,结果还是有问题(之前我已经安装过pip和virtualenv):

代码: 全选

yhl@yhl-laptop:~$ cd my_env
yhl@yhl-laptop:~/my_env$ virtualenv --no-site-packages --python=python2.7 .
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in ./bin/python2.7
Not overwriting existing python script ./bin/python (you must use ./bin/python2.7)
Installing setuptools, pip...done.
yhl@yhl-laptop:~/my_env$ python --version
Python 2.6.5
上次由 iorikyox 在 2014-10-20 19:27,总共编辑 3 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#11

帖子 poloshiao » 2014-10-20 16:04

從這個網頁
http://ppa.launchpad.net/fkrull/deadsna ... 4/Packages
使用 python2.7 搜尋
可以找到 這個 ppa 含有 python2.7

ppa 仍然要加上

直接下載 deb 來安裝看看
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#12

帖子 iorikyox » 2014-10-20 16:17

问题好像找到了:
http://virtualenv.readthedocs.org/en/la ... alenv.html,说
Warning
When using pip to install virtualenv, we advise using pip 1.3 or greater. Prior to version 1.3, pip did not not download from PyPI over SSL.

而我查了一下自己装的版本:

代码: 全选

yhl@yhl-laptop:~$ pip --version
pip 0.3.1 from /usr/lib/python2.6/dist-packages (python 2.6)
有结果了再来,呵呵。
上次由 iorikyox 在 2014-10-20 19:16,总共编辑 1 次。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#13

帖子 iorikyox » 2014-10-20 17:08

poloshiao 写了:從這個網頁
http://ppa.launchpad.net/fkrull/deadsna ... 4/Packages
使用 python2.7 搜尋
可以找到 這個 ppa 含有 python2.7

ppa 仍然要加上

直接下載 deb 來安裝看看
http://ppa.launchpad.net/fkrull/deadsna ... python2.7/
谢谢回复。

http://virtualenv.readthedocs.org/en/la ... alenv.html找到安装的要求:
Warning
When using pip to install virtualenv, we advise using pip 1.3 or greater. Prior to version 1.3, pip did not not download from PyPI over SSL.

再查看自己的pip版本

代码: 全选

$ pip --version
pip 0.3.1 from /usr/lib/python2.6/dist-packages (python 2.6)
虽然也安装了setuptools,但打开synaptic查看,版本号也是低的可怜,没办法,只能全部卸载。

搜索“install pip”,在https://pip.pypa.io/en/latest/installing.html中找到解决办法:
Install pip
To install or upgrade pip, securely download get-pip.py. [1]
Then run the following (which may require administrator access):

代码: 全选

$ python get-pip.py
If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you. [2]

执行命令的时候,需要加管理员权限和强调python版本:

代码: 全选

$ sudo python2.7 get-pip.py
Downloading/unpacking pip
  Downloading pip-1.5.6-py2.py3-none-any.whl (1.0MB): 1.0MB downloaded
Downloading/unpacking setuptools
  Downloading setuptools-7.0-py2.py3-none-any.whl (534kB): 534kB downloaded
Installing collected packages: pip, setuptools
Successfully installed pip setuptools
Cleaning up...
OK,pip和setuptools都装好了。pip版本1.5.6,setuptools-7.0

根据页面http://virtualenv.readthedocs.org/en/la ... alenv.html说明,安装virtualenv:

代码: 全选

$ sudo pip install virtualenv
Downloading/unpacking virtualenv
  Downloading virtualenv-1.11.6-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
环境已经建好,再次回到http://askubuntu.com/questions/17841/wi ... 6002#26002的教程进行:

代码: 全选

$ mkdir my_env && cd my_env
$ virtualenv --no-site-packages --python=python2.7 .
$ source bin/activate
(my_env)yhl@yhl-laptop:~/my_env$ python --version
Python 2.7.6
显示说明,很顺利的进入了virtualenv设定的python2.7环境,一切安装都没问题了。
试用程序的结果:

代码: 全选

(my_env)yhl@yhl-laptop:~/my_env$
***(试运行程序保密:))
提示说明,配套程序与python版本不符,需要手动更新。
然后,试一下退出virtualenv环境的命令吧:

代码: 全选

(my_env)yhl@yhl-laptop:~/my_env$ deactivate
yhl@yhl-laptop:~/my_env$ python --version
Python 2.6.5
顺利退出来了。
上次由 iorikyox 在 2014-10-20 19:37,总共编辑 2 次。
头像
iorikyox
帖子: 92
注册时间: 2010-04-02 16:16

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#14

帖子 iorikyox » 2014-10-20 17:21

此帖顺利的解决了ubuntu10.04安装python2.7.6问题(系统默认python2.6.5版,采用了添加ppa软件源中提供的python2.7.6的deb包安装,至于python2.7.8应该如何安装,待测试,相信源码包编译安装没问题),并且成功使用virtualenv,方便的在各个版本python之间切换,有需要的朋友,可以来参考下。

特别感谢网友poloshiao的支持。
头像
TeliuTe
论坛版主
帖子: 7675
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 【已解决】请教,ubuntu10.04下,如何卸载python2.7.8?

#15

帖子 TeliuTe » 2014-10-20 18:01

代码: 全选

[text][/text]
标签可以折叠长文本
回复