简体   繁体   English

在不同版本的python之间转换包

[英]Shifting packages between different versions of python

My mac has two versions of Python, 我的Mac有两个版本的Python,

one installed in /Library/Frameworks/Python.framework/Versions/2.7/bin/pip 一个安装在/Library/Frameworks/Python.framework/Versions/2.7/bin/pip

and the other /Library/Python/2.7/site-packages/ 和其他/Library/Python/2.7/site-packages/

I have plenty of packages installed in the second directory. 我在第二个目录中安装了很多软件包。 How do I move all those packages under the first python ? 如何在第一个python下移动所有这些软件包?

Also How do I force my mac to use the first Python ? 另外,如何强制Mac使用第一个Python?

Typically on a Mac you would expect to find: 通常,在Mac上,您会期望找到:

  • /System/Library/Frameworks/Python.framework /System/Library/Frameworks/Python.framework
  • /Library/Python /图书馆/ Python

You should never touch the first, so the second exists to add local libraries. 您永远不要碰第一个,因此第二个存在以添加本地库。 What problem are you trying to solve by moving libraries? 您要通过移动库来解决什么问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 避免为每个项目安装 python/packages 版本。 如何在不同项目之间共享包含包和 python 版本的路径? - Avoid installing python/packages versions for each project. How to share a path containing packages and python versions between different projects? 为不同的python版本准备Pypi包 - Preparing packages for Pypi for different python versions Python的不同版本,Anaconda中的封装和许多端子 - Different versions of Python, packages and many terminals in Anaconda 如何为不同版本的Python安装软件包? - How to install packages for different versions of Python? 如何将安装包安装到不同版本的Python中 - How to pip install packages into different versions of Python 在不同版本的python之间导入 - Importing between different versions of python python包的版本管理 - Versions management of python packages 根据所使用的插件使用不同版本的Python软件包 - Use different versions of Python packages depending on the plugin that is used 同一脚本的不同版本以及同一python安装上的软件包 - Different versions of the same script with packages on the same python installation 如果两个 python 包具有不同版本的 package 依赖关系怎么办? - What if two python packages have different versions of package dependencies?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM