Linux多个版本Python怎么解决?

ImN1 2015-01-04 03:56:43
主要是模块安装的问题
另外 import 有没有影响?
...全文
327 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ImN1 2015-01-06
  • 打赏
  • 举报
回复
基本解决,没留意debian还有pip3,常用包都有分两个版本,结贴~
  • 打赏
  • 举报
回复
globally, it's your responsibility to maintain an intact Python environment for the scripts that rely on it (#! /usr/bin/env python), especially the ones that are vital for the operation of your OS, such as yum. It's sad to say that python runs into the same problem that other dominant programming language went through: dependencies hell... That has been said, python programmers prefer the approach called sandbox, which is the localized python environment that is spawned from a Python base installation. There are tools out there to serve this purpose, the most popular one is virtualenv. Starting from Python 3, it's built-in venv. As for virtualenv, you can install it through pip, and there are other utilities, such as virtualenvwrapper,virtualenv-burrito, which were built on top of virtualenv and offer finer control on the behaviors of the virtual environment and the bootstrap of your python scripts. The best practice seems to be having a python virtual environment for each python application to avoid any collision or compatibility issues among modules. Regarding to the concern you have on module import, please be more specific...
bugs2k 2015-01-04
  • 打赏
  • 举报
回复
遇到啥问题了?最新的ubuntu下就可以安装多个版本

37,720

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧