安装Python软件包-IronPython [英] Installing Python Packages - IronPython
问题描述
我想将PRAW软件包添加到VS中的IronPython解决方案中,但是事实证明这很麻烦.这是我正在采取的步骤
I'd like to add the PRAW package to an IronPython solution in VS however it's proving to be a pain in the butt. Here are steps I'm taking
- 右键单击IronPython Environment,选择安装python软件包.
- 使用pip输入抓取"
- 我得到一个提示,告诉我需要安装pip.
然后我看到以下内容:
Installing 'pip' package manager.
Downloading distribute from https://go.microsoft.com/fwlink/?LinkID=306663
Installing from distribute-0.6.45
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at c:\program files (x86)\ironpython 2.7\lib\site-packages\setuptools-0.6c11-py2.7.egg
Egg installation
Already patched.
running install
Traceback (most recent call last):
File "setup.py", line 147, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\distutils\core.py", line 151, in setup
File "C:\Program Files (x86)\IronPython 2.7\Lib\distutils\dist.py", line 952, in run_commands
File "C:\Program Files (x86)\IronPython 2.7\Lib\distutils\dist.py", line 971, in run_command
File "c:\users\mj\appdata\local\temp\ptvs-9jvsvw-pip_downloader\distribute-0.6.45\setuptools\command\install.py", line 63, in run
AttributeError: 'module' object has no attribute '_getframe'Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\pip_downloader.py", line 47, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\subprocess.py", line 512, in check_call
subprocess.CalledProcessError: Command '['C:\\Program Files (x86)\\IronPython 2.7\\ipy64.exe', 'setup.py', 'install']' returned non-zero exit status 1
'pip' failed to install. Exit code: 1
安装失败的原因是:AttributeError:'module'对象没有属性'_getframe'Traceback(最近一次调用最后一次):
With the reason for the failed install being: AttributeError: 'module' object has no attribute '_getframe'Traceback (most recent call last):
我该如何解决?有没有一种方法可以以其他方式安装pip和ironpython?是否有一种无需使用pip来安装软件包/库的方法?我可以通过Pip for python 2.7很好地安装该软件包.
How do I get around this? Is there a way to install pip and for ironpython in a different manner? Is there a way to install packages/libraries by not having to use pip? I can install the package just fine via Pip for python 2.7.
推荐答案
您必须使用命令行选项-X:FullFrames
运行IronPython.不过,我不确定如何在VS中进行设置.
You have to run IronPython with the command line option -X:FullFrames
. I'm not sure, though, how to set that up in the VS.
也许您可以手动运行它:
Maybe you can manually run it:
C:\path\to\ipy64.exe -X:FullFrames path\to\pip.py install whaterver_you_want
这篇关于安装Python软件包-IronPython的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!