当安装了与旧版本链接的软件包时,安装新版本的Python [英] Install a newer Python when there are installed packages linked against the old one

查看:144
本文介绍了当安装了与旧版本链接的软件包时,安装新版本的Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(请耐心等待,这里有很长的描述,这是一个相当麻烦的故障排除过程。)

(Please bear with me for the long description, it has been quite a troubleshooting journey.)

我的最终目标是python软件包 graph_tool 在我的系统上也可以在ipynb上运行。我已经

brew安装图形工具,如此处指示,但这仍然不够。

My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool, as indicated here, but that's still insufficient.

所以我遵循 conda说明,并尝试满足所有要求,包括拥有 cgal python3.6 。我最初有一个带有python2.7和python3.5的anaconda,但是由于python3.6是必需的,所以我下载了带有python3.6的anaconda3。 ( conda更新python 仍然不断给我3.5)

So I follow conda instructions here, and try to fulfill all requirements including having cgal and python3.6. I had anaconda with python2.7 and python3.5 originally, but since python3.6 is necessary, I download anaconda3 with python3.6. (conda update python still kept giving me 3.5)

我删除了/ Users / mymacbook / anaconda,因此/ Users / mymacbook / anaconda3将是默认的搜索目录。而且我有一个小小的成功!

I delete /Users/mymacbook/anaconda, so that /Users/mymacbook/anaconda3 would the default search directory. And I have a mini-success!

$ python3
Python 3.6.2 |Anaconda, Inc.| (default, Sep 21 2017, 18:29:43) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

不幸的是,由于我继续 conda安装其他所需的软件包(boost,cgal等),我的python3恢复为3.5:(

Unfortunately, as I continue to conda install the other packages required (boost, cgal, etc), my python3 is reverted back to 3.5 :(

$ python3
Python 3.5.4 |Anaconda custom (x86_64)| (default, Oct  5 2017, 02:58:14)

$ conda install python=3.6
Fetching package metadata ...........
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - cgal -> python 3.5*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

$ conda info cgal
Fetching package metadata ...........

ResolvePackageNotFound: 
  - cgal

确实是个泡菜。。。建议使用ResolvePackageNotFound卸载cgal,但是正如我提到的,我同时需要cgal和python3.6

Quite a pickle isn't it... A recommendation was to uninstall cgal due to ResolvePackageNotFound, but like I mentioned, I need both cgal and python3.6.

预先感谢帮助! (并且请在您的建议中加入适用的命令行-我是初学者)

Thanks in advance for the help! (and please include applicable command lines with your suggestions - I'm a beginner)

推荐答案

您的 cgal 的已安装副本是针对Python 3.5编译的。如果您查看 https://anaconda.org/conda-forge/cgal/files,每个Python次要版本都有一个单独的软件包。

Your installed copy of cgal is compiled for Python 3.5. If you look at https://anaconda.org/conda-forge/cgal/files , there's is a separate package for each Python minor version.

管理Python — Conda文档建议


  • 安装新Python一个新的环境(如果您不想替换现有的安装),或者

  • 更新'(与其他软件包一起使用)需要)如果您确实要替换当前的软件包

  • installing a new Python to a new environment if you don't want to replace an existing installation, or
  • update'ing it (together with other packages if needed) if you do want to replace the current one

当然,您可以卸载所有特定于版本的软件包,安装新的Python,然后重新安装软件包-但这需要更多工作。

Of course, you can instead uninstall all version-specific packages, install the new Python, then reinstall the packages - but that's more work.

这篇关于当安装了与旧版本链接的软件包时,安装新版本的Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆