-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create a new environment #1565
Comments
This typically means something in your Visual Studio installation has been corrupted. Can you try running a Repair install? (Open Programs and Features, find "Microsoft Visual Studio 2015" and choose Change, then select Repair) |
Hi Steve, I tried to repair Visual Studio. I also attempted to uninstall every possible MS Visual Studio associated program. Interesting enough a few could not be uninstalled. Is there a utility to completely uninstall Visual Studio? Thanks, Sent from my iPad
|
I'm afraid not, but it's a goal for the next version. You shouldn't have to uninstall it to do a repair though. |
Agreed. However the repair did not solve the problem. The result is with no environment PTVS Is unusable. Sent from my iPhone
|
I was successful in resolving this problem via the following by:
|
Same problem here. In my case it happened after selecting the path to the Python interpreter 3.6.0a4 (64 bit). Visual Studio crashed and since then PTVS was disabled. I tried to repair and uninstall Visual Studio 2015 several times. I also tried to remove the registry keys associated with VS, and even automate this operation, the problem is not solved. It took more than a week testing solutions and is impossible to repair PTVS. Why is it so difficult to make an 'clean' uninstaller for this extension? |
My problems also began when I installed Python 3.6. Perhaps this is somehow related to the root cause. |
Earlier versions of PTVS don't always handle new versions of Python well (as in, we throw an exception when parsing the version number, and don't always catch it :( ), so it's entirely possible that Python 3.6 is the problem. I don't think it's an issue in the latest release (2.2.5), but please shout out if it is. (You don't need to uninstall/delete anything before upgrading using the installer from GitHub.) |
Python 3.6 seems to be a likely cause because I experienced similar problems ater installing the stable 3.6 release today on VS 2015 Enterprise (Update 3) with PTVS 2.2.5. The new environment wasn't detected so I tried to add a custom one. VS crashed, and after that all existing environments are gone and I am unable to add custom ones now. I already unstalled all Python versions, then reinstalled the 3.5 versions, cleaned the registry, deleted the Python Tools directory in the local AppData folder, reinstalled PTVS (2.2.5) and repaired VS. Unfortunately, the problem still persists. I would be very thankful for any hint on how to repair. Unfortunately, I found this thread only after the damage was done :-( |
Encountered the same issue here - the Customize button grayed out after installing python 3.6 and since have not been able to make any change to the environment even after removing python 3.6 and reinstalling 3.4. Anyone here to rescue perhaps? |
Python 3.6 isn't supported by PTVS 2.2.5 (since it didn't exist when we released it), but you should be able to add it as a custom environment and call it 3.5. There's a separate bug because auto-detect doesn't work (#1994), so you'll have to fill in the paths manually. If you've already run into trouble, you can try deleting your |
Thanks but by deleting the ComponentModelCache folder did not seem to solve the issue. The custom environment support is still disabled although I have also tried to reinstall VS as well. |
Can you try uninstalling Python Tools for Visual Studio from Programs and Features, then installing the one downloaded from https://github.com/Microsoft/PTVS/releases/tag/v2.2.5post1 |
Same problem here, the custom button under Python environments in the Visual Studio Community Edition 2015 is not responsive, basically the solution Ctlr+K or Open the Python Environments window (View -> Other Windows -> Python Environments) and click "+ Custom...": does not work, VC++ and other compilers work. What I did before, was to add and autofind my python 3.4 64 bit edition.
Now I have 3 python versions installed (2.7, 3.4, 3.6 in 32 and 64 bit) and still the python integration |
Solution for VS 2015 Community HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\PythonTools\Interpreters Source: #1994 |
Deleting the registry key fixed my issue. all appears to be back to normal. Thanks.. LG |
…hes with Python 3.6 64-bit Improves handling when loading invalid version numbers from the registry Prevents unsupported version numbers being auto-detected when configuring an environment.
There is a 2.2.6 RC release at https://github.com/Microsoft/PTVS/releases/tag/v2.2.6-rc with the fix for this issue. Please try it out and let us know if anything goes horribly wrong - we want to push the fix to all users within the next month. |
The 2.2.6 RC works fine on Win7 and VC2015 community. There is an interesting twist.
and the interactive environment (Ctrl-K) is python 3.4 64-bit,
Upon switching to Python interactive 2.7 it will print
That is not possible. It should print "3", because changes in python. So I guess VC2015 does not crash anymore, or blocks out with grey buttons, but there is still some Upon restart of VC2015 it will bring out an error window and then VC shows
then
Then
and then worse errors appear, upon loading standard (not related) VC++ projects,
After a couple of restarts it kinda works. One can switch between Python 3.4 and 2.7. |
@tobigithub Thanks for the info. The component model cache problem is a VS bug that won't be fixed, but restarting VS should resolve it (as the message suggests). If you previously had a custom environment set up for 3.6 that was breaking VS, we probably automatically changed the version to 2.7 (which is the default version everywhere throughout that version of PTVS). That shouldn't affect anything except syntax errors in the editor, but possibly some saved selections are now confused about which environment to use (for example, something is looking for "2.7" and having to choose between two different 2.7's, whereas before there was only one). Editing the custom environment and selecting "3.5" as the version should get you as close as is possible. Unfortunately, the places in code where we default to 2.7 are not suitable for deeper inspection (we can't run python.exe and ask it, for example), so when we encounter an invalid version number choosing the default is the only realistic option. |
@zooba Thank you. |
Problem: Unable to create a new environment via the "Custom" button in the Python Environments pane. The "Custom" button seems unresponsive.
Installed Python Environments The following three environments are installed on the local machine:
Windows Environment Information
The text was updated successfully, but these errors were encountered: