pip IronPython and PTVS on VS 2015 doesn't seem to work well
See original GitHub issueI tired to look for an issue because I don’t think I’m the first one to encounter it but I couldn’t find one. Here are the step I did:
- Install latest visual studio 2015 community Version 14.0.25421.03 Update 3 with PTVS (To be honest it was already installed)
- Install latest IronPython - 2.7.5 (to program files - I know this creates an issue with admin rights).
- Try and install html5lib from VS environment (right click the “python environment” on an IronPython vs project).
I get this output:
Restarting IronPython with -X:Frames
Installing with ensurepip
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
Downloading/unpacking pip
Installing collected packages: setuptools, pip
Successfully installed setuptools pip
Cleaning up...
Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b
Downloading/unpacking setuptools from https://pypi.python.org/packages/d7/3d/577bafbfc9fcd78ed7b45de24a6bc30a94cc75cbde786389f1014d433614/setuptools-23.1.0-py2.py3-none-any.whl#md5=bdffb519c49d6bf3aae47f8f1a6ea3b5
Downloading/unpacking wheel
Installing collected packages: pip, setuptools, wheel
Found existing installation: pip 1.5.6
Uninstalling pip:
Successfully uninstalled pip
Found existing installation: setuptools 3.6
Uninstalling setuptools:
Successfully uninstalled setuptools
Successfully installed pip setuptools wheel
Cleaning up...
Installation Complete
C:\Program Files (x86)\IronPython 2.7\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef
"""Weak reference support for Python.
C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no parameters
# urllib3/connectionpool.py
C:\Program Files (x86)\IronPython 2.7\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef
"""Weak reference support for Python.
'pip' was installed successfully.
Installing 'html5lib'
Unhandled exception:
Traceback (most recent call last):
File "C:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 170, in run_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 101, in _get_module_details
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 456, in get_loader
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 466, in find_loader
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 422, in iter_importers
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\__init__.py", line 13, in <module>
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\exceptions.py", line 6, in <module>
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\six.py", line 701, in <module>
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\six.py", line 692, in exec_
File "C:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 109, in _get_module_details
AttributeError: 'module' object has no attribute '_getframe'
I know this is related to the -X:Frames flag which I found in various places but I have configured it in the interactive window settings but I’m not sure it applies to pip.
I have managed to do it from outside visual studio using regular command line so I don’t think this is an IronPython issue as far as I can understand. I’m very new to python but extremely familiar with Visual Studio (C#, C++, TypeScript, etc…)
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
pip IronPython and PTVS on VS 2015 doesn't seem to work ...
Try and install html5lib from VS environment (right click the "python environment" on an IronPython vs project). image. I get this output:.
Read more >PTVS doesn't detect IronPython installation
The good news is you can manually select to install IronPython support. First un-install, then start the installer and on the very first...
Read more >Select and install Python interpreters - Visual Studio
A complete list of Python interpreters that are supported in Visual Studio with brief instructions on where to find their installers.
Read more >Manage Python environments and interpreters - Visual ...
Use the Python Environments window to manage global, virtual, and conda environments. Install Python interpreters and packages and assign ...
Read more >July | 2015 | Thusitha Mabotuwana's Blog
The first thing you need to do is download PTVS from CodePlex. I downloaded PTVS 2.1 VS 2013.msi since I'm on VS2013.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s possible that when we update pip we get a version that isn’t compatible with IronPython. The first log shows that we’re jumping ahead a lot of versions. Unfortunately, I don’t think the old version of pip will actually work anymore, as PyPI has had some changes.
I don’t think you’re doing anything incorrect, you’re just doing something that’s fairly uncommon. There is a very small community trying to use pip with IronPython and an even smaller one trying to keep them compatible. Probably it’s going to require someone to dig through and diagnose all the issues, then submit a PR to pip to get support again.
The
-m pip
error might be an IronPython bug or a pip bug. Generally-c "import pip; pip.main()"
is a direct replacement for-m pip
here.Actually, I don’t remember, but we couldn’t use other libraries we needed so we stopped trying making it work.