PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Visual Studio 2022 crashes when i try to open "manage python packages"

Open vsfeedback opened this issue 2 years ago • 18 comments

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version] Hi!

When i right-click on the python environment and press "Manage Python Packages" visual studio crashes and reboots. I have tried upgrading, i´m now on 17.1.1 (2022 Community 64-bit).

I´m on windows 10, just over 2 GHz, 32 GB ram, Gforce 1050.

The nuget package manager is 6.1.0 i have tried with python 3.9 and 3.7.9

I don´t really know what more to say, i have attached a logfile screenshot (at least i think so).


Original Comments

Feedback Bot on 3/22/2022, 06:25 AM:

(private comment, text removed)

Martin Lith on 3/22/2022, 08:46 AM:

(private comment, text removed)

Martin Lith on 3/22/2022, 10:47 AM:

(private comment, text removed)


Original Solutions

(no solutions)

vsfeedback avatar Mar 30 '22 16:03 vsfeedback

I am experiencing the exact same issue, only my conda environment was also overwritten. Now I have lost every environment variable my largest project was dependent on. This version should not have been released with a bug that literally undoes weeks worth of work. I am currently livid with Microsoft!!!

heathermrauch avatar Mar 30 '22 17:03 heathermrauch

Same problem. Also it seems there are some invalid environments it tries to detect before the crash.

asm128 avatar Apr 03 '22 02:04 asm128

@heathermrauch, Sorry for the issues you are seeing. Unfortunately, we have been unable to reproduce this. Could you please try installing the latest Python from python.org. There have been some issues with pip and want to eliminate that possibility.

@asm128, what are the invalid environments errors that you are seeing?

judej avatar Apr 13 '22 18:04 judej

@judej, I uninstalled VS 2022 and reverted to 2019. Because of this issue, I had to completely rebuild my environment from scratch and was unable to do so using the latest version of python as some of the libraries on which my applications depend are not compatible with the latest release. Because of all the rework my first attempt at this took, I have no intention of reinstalling the latest version of Visual Studio or attempting to reproduce the issue. I will more likely switch which IDE I use in the future since I have already been experiencing issues with Visual Studio crashing for no apparent reason. I can guarantee I am not the only developer who is doing so because of the increasingly unstable releases of this product.

heathermrauch avatar Apr 13 '22 18:04 heathermrauch

@heathermrauch, Sorry for the issues you are seeing. Unfortunately, we have been unable to reproduce this. Could you please try installing the latest Python from python.org. There have been some issues with pip and want to eliminate that possibility.

@asm128, what are the invalid environments errors that you are seeing?

I have this problem in another windows 10 just installed with miniconda 3 also present and probably Python 10 too. Nothing else.

asm128 avatar Apr 13 '22 18:04 asm128

The conda env i created only has opencv-python installed

@heathermrauch You should do like me and write code that doesn't get old by relying less on experimental and or third-party stuff

asm128 avatar Apr 13 '22 19:04 asm128

The conda env i created only has opencv-python installed

@heathermrauch You should do like me and write code that doesn't get old by relying less on experimental and or third-party stuff

@asm128, thanks for the advice. Unfortunately that is not an option since the purpose of my code is to integrate with the API for the "third party stuff".

heathermrauch avatar Apr 13 '22 19:04 heathermrauch

The conda env i created only has opencv-python installed @heathermrauch You should do like me and write code that doesn't get old by relying less on experimental and or third-party stuff

@asm128, thanks for the advice. Unfortunately that is not an option since the purpose of my code is to integrate with the API for the "third party stuff".

You can always upgrade what's outdated to the latest version of everyhing and implement what's missing if there's something that got too old or is too difficult to maintain. Why keeping supporting code that doesn't work on the latest release of the language or whatever? I brought to date large C++ projects that were written for Visual C++ 6 without any real difficulties (just they didn't even had to declare the type of the varirable and it assumed int for unknown vars.

asm128 avatar Apr 13 '22 19:04 asm128

The conda env i created only has opencv-python installed @heathermrauch You should do like me and write code that doesn't get old by relying less on experimental and or third-party stuff

@asm128, thanks for the advice. Unfortunately that is not an option since the purpose of my code is to integrate with the API for the "third party stuff".

You can always upgrade what's outdated to the latest version of everyhing and implement what's missing if there's something that got too old or is too difficult to maintain. Why keeping supporting code that doesn't work on the latest release of the language or whatever? I brought to date large C++ projects that were written for Visual C++ 6 without any real difficulties (just they didn't even had to declare the type of the varirable and it assumed int for unknown vars.

@asm128 Sorry, but I think you misunderstand me. I am using an a Python SDK to access a third party API which is incredibly large and maintained by a separate organization. It is far out of scope of my project, and my currently employed role to be honest, to rewrite an entire API SDK just because it relies on libraries that are not yet updated for the latest Python release.

Additionally, this thread is now very off topic. The point was, installing the latest Visual Studio release should not have prevented me from using one version lower than the latest Python release. Nor should it have removed my conda environment or crashed when attempting to select an environment. I appreciate your willingness to provide feedback, but I don't feel it applies to my current situation or this thread, specifically since it is about Python, not C++.

heathermrauch avatar Apr 13 '22 19:04 heathermrauch

Hi EveryOne i have the same issue with the Community and Professional versions of VS2022, the Select environment dropdown does not showing the environments, only show the latests Python version installed, and when you try to select after create a new one, the window crashes. I think that happened when i use a python 3.10 version that is not supported yet. but i uninstall it and install python 3.9 and still crashing. I tested the same project on vs2019 and works fine. Do you know how we can solve it? i need to add this project to a .NET 6 main app (i use a python API, due the numpy library functions that i can't port) and i can´t do it because VS2019 doesn't support Net 6.

Thanks in advance. Greetings

Roberto-Yanes avatar Apr 20 '22 15:04 Roberto-Yanes

I find this insulting. Fix the product if you want me to open my project in VS2022.

image

asm128 avatar Apr 21 '22 03:04 asm128

I solve my problem uninstalling all visual studio versions and all python versions. After that, install python from windows store. It crashes if you install the python.org installer. After i install the VS 2022 pro version and it worked correctly.

Roberto-Yanes avatar Apr 21 '22 04:04 Roberto-Yanes

I too tried to switch conda envs and had VS 17.1.5 crash repeatedly. Roberto-Yanes says he uninstalled all VS versions and all python versions, then reinstalled python from windows store. I am reluctant to do that since I already have envs set up that support existing systems. I don't want to lose them. Is there another solution? Are the developers of VS looking at this? Has a ticket been created?

SteveM49 avatar Apr 22 '22 15:04 SteveM49

I also have this issue. With only the Microsoft version Python 3.9 it worked, but when I added Annaconda the issues started. As soon as I try to open the packaging manager Visual Studio crashes. I also recognized that it does not support Python 3.10 which I tried to install at some point.

Currently I use: Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.1.6

alphamonda avatar May 03 '22 07:05 alphamonda

@heathermrauch, Sorry for the issues you are seeing. Unfortunately, we have been unable to reproduce this. Could you please try installing the latest Python from python.org. There have been some issues with pip and want to eliminate that possibility.

@judej I had to set up a new pc from scratch, so I figured I'd give this another go. I was finally able to get this to run with python 3.9, but only after using a brand new computer without anything but anaconda installed. Something from previously installed apps or settings appears to be conflicting with the build.

I also wanted to note, as I was clicking through the various items listed in the options, the page does not change until you click an item, click something else, then click the item you want a second time.

heathermrauch avatar May 13 '22 19:05 heathermrauch

Hi @Roberto-Yanes @alphamonda @SteveM49, sorry for the issues you are experiencing. We have been trying to reproduce this but were not able to. Could you please share your repro steps from a clean install? That would be really helpful. :blush: Thanks!

StellaHuang95 avatar Jun 06 '22 22:06 StellaHuang95

Hi, I do not recall the precise steps, but the issue occurred when:

  • I first had some normal Python version installed
  • I then installed the newest which was 3.10
  • Then I installed Python via Anaconda, from there the crashes started.

I think it has to do with the newest version of Python which was not “known” to Visual Studio.

Now I deinstalled all Python versions. I only use Anacona with Python 3.9. Since then it does not crash any more.

Hope that helps a bit.

Best regards,

Oliver

From: Stella @.> Sent: Tuesday, June 7, 2022 12:06 AM To: microsoft/PTVS @.> Cc: Oliver Haller @.>; Mention @.> Subject: Re: [microsoft/PTVS] Visual Studio 2022 crashes when i try to open "manage python packages" (Issue #6944)

Hi @Roberto-Yanes https://github.com/Roberto-Yanes @alphamonda https://github.com/alphamonda @SteveM49 https://github.com/SteveM49 , sorry for the issues you are experiencing. We have been trying to reproduce this but were not able to. Could you please share your repro steps from a clean install? That would be really helpful. 😊 Thanks!

— Reply to this email directly, view it on GitHub https://github.com/microsoft/PTVS/issues/6944#issuecomment-1147980331 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMIX2QHNLZ3BBFE5DWYGFPTVNZY5ZANCNFSM5SCN55KA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AMIX2QFZOZ6AXBBM72DP6KLVNZY5ZA5CNFSM5SCN55KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIRWMUKY.gif Message ID: @.*** @.***> >

alphamonda avatar Jun 07 '22 16:06 alphamonda

the first two versions of python did they come from the Visual Studio installer? or windows store? or direct download from the python site?

bschnurr avatar Jun 07 '22 17:06 bschnurr

Closing old issue. If this is still a problem, please reopen with the information requested. thanks

judej avatar Aug 30 '22 22:08 judej

The first ones were directly installed from the python site.

From: Bill Schnurr @.> Sent: Tuesday, June 7, 2022 7:23 PM To: microsoft/PTVS @.> Cc: Oliver Haller @.>; Mention @.> Subject: Re: [microsoft/PTVS] Visual Studio 2022 crashes when i try to open "manage python packages" (Issue #6944)

the first two versions of python did they come from the Visual Studio installer? or windows store? or direct download from the python site?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/PTVS/issues/6944#issuecomment-1148958957 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMIX2QDOLI6J5UXFVO4Z5VLVN6APZANCNFSM5SCN55KA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AMIX2QDT2DXAJCG4RAPEBGTVN6APZA5CNFSM5SCN55KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIR53R3I.gif Message ID: @.*** @.***> >

alphamonda avatar Oct 11 '22 07:10 alphamonda