[英]Python update from 2.7.6 to 2.7.8 - did I just lose all my previously installed modules?
Title basically states it all. 标题基本上说明了一切。 I upgraded my version of Python in order to hopefully play more nicely with Mac OS 10.9, but am now unable to use some modules I need for my work (
NumPy
, Pandas
, SciPy
, Scikit-Learn
, etc.) Does this upgrade automatically wipe out any previously installed modules? 我升级了Python版本,以便可以在Mac OS 10.9上更好地玩,但现在无法使用我工作所需的某些模块(
NumPy
, Pandas
, SciPy
, Scikit-Learn
等)。此升级是否会自动Scikit-Learn
淘汰以前安装的模块吗? Do I just need to install them again? 我是否需要再次安装? Thanks in advance.
提前致谢。
When you upgraded, it created a new sitepackages
directory structure. 升级后,它创建了一个新的
sitepackages
目录结构。 Your packages are not installed any more, so yes you need to reinstall them into the new version. 您的软件包已不再安装,因此,您需要将其重新安装到新版本中。
Before you do that, take a good look at virtual environments rather than install the modules and packages globally. 在执行此操作之前,请仔细看一下虚拟环境,而不要全局安装模块和软件包。
http://docs.python-guide.org/en/latest/dev/virtualenvs will get you started, then google virtualenvwrapper. http://docs.python-guide.org/zh-CN/latest/dev/virtualenvs将带您入门,然后使用Google virtualenvwrapper。
I would recommend you try out the anaconda python distribution. 我建议您尝试使用anaconda python发行版。 It comes with all of these packages pre-installed, and its free.
它预装了所有这些软件包,并且是免费的。 Also, in addition to pip, you can use the
conda
package manager which is much better for scientific packages. 另外,除了pip之外,您还可以使用
conda
软件包管理器,它对于科学软件包来说要好得多。 See http://technicaldiscovery.blogspot.com/2013/12/why-i-promote-conda.html for an explanation. 有关说明,请参见http://technicaldiscovery.blogspot.com/2013/12/why-i-promote-conda.html 。
With conda
, you can install numpy/scipy/pandas/etc with conda install numpy scipy pandas
and it just works, and takes about 10 seconds. 使用
conda
,您可以使用conda conda install numpy scipy pandas
来安装numpy / scipy / pandas / etc,它可以正常工作,大约需要10秒钟。 No compilation necessary (OTOH pip install scipy
can take over 15 minutes, requires a fortran compiler, and is generally very tricky). 无需编译(OTOH
pip install scipy
可能需要15分钟以上,需要使用fortran编译器,并且通常非常棘手)。
link: http://continuum.io/downloads 链接: http : //continuum.io/downloads
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.