Python 如何在 anaconda 中安装 PyPy
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29056963/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install PyPy in anaconda
提问by Menezes Sousa
I have a Linux-64 bit machine. How do I install PyPy in my anaconda environment. I tried conda install pypy. It says there are no available packages. pip install pypy also returns a similar message. Is it that the only way to install PyPy is by downloading the tar.gz file from the website? Once installed, how do I configure my Anaconda environment in such a way so as to be able to switch from PyPy to other Python implementations when required?
我有一台 Linux-64 位机器。如何在我的 anaconda 环境中安装 PyPy。我试过 conda install pypy。它说没有可用的包。pip install pypy 也会返回类似的消息。安装 PyPy 的唯一方法是从网站下载 tar.gz 文件吗?安装后,如何配置我的 Anaconda 环境以便能够在需要时从 PyPy 切换到其他 Python 实现?
回答by Harvey
Puppy's version support can found here: http://pypy.org/download.html.
Puppy 的版本支持可以在这里找到:http: //pypy.org/download.html。
It is distributed specific, so if you don't have a supported district you can. Try using the build option.
它是特定分布的,因此如果您没有受支持的地区,则可以。尝试使用构建选项。
Without more info on your Linux and python versions, it is hard to add more.
如果没有关于您的 Linux 和 python 版本的更多信息,就很难添加更多信息。
回答by astrojuanlu
NOTE: conda-pypy is archived, this answer outdated, and conda-forge is in the process of producing PyPy packages. You should use that instead.
注意:conda-pypy 已存档,此答案已过时,并且 conda-forge 正在生成 PyPy 包。你应该改用它。
There is an alternative approach maintained by Riccardo Vianello on GitHub:
Riccardo Vianello 在 GitHub 上维护了另一种方法:
https://github.com/rvianello/conda-pypy
https://github.com/rvianello/conda-pypy
It basically involves using his conda channel instead of the default one to install necessary packages. Some basic ones are provided.
它基本上涉及使用他的 conda 频道而不是默认频道来安装必要的软件包。提供了一些基本的。
回答by Ohad
You can install PyPy3 from conda-forge:
您可以从 conda-forge安装PyPy3:
conda install -c conda-forge pypy3.6
conda install -c conda-forge pypy3.6
And then use it like your regular python
executable (notice that this is a different Python interpreter, not a package)
然后像您的常规python
可执行文件一样使用它(请注意,这是一个不同的 Python 解释器,而不是一个包)
pypy3 -c "import sys; print(sys.version)"
pypy3 -c "import sys; print(sys.version)"
It works on Linux and OSX.
它适用于 Linux 和 OSX。