blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

Blender:Start issues on Windows 10

Open maybites opened this issue 5 years ago • 15 comments

When trying to start blender via VS Code I get the following error:

blender starts up but crashes after a few seconds:

Executing task: c:\Program Files\Blender Foundation\blender-2.80.0\blender.exe --python c:\Users\maybites.vscode\extensions\jacqueslucke.blender-development-0.0.11\pythonFiles\launch.py <

Read prefs: C:\Users\maybites\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend found bundled python: c:\Program Files\Blender Foundation\blender-2.80.0\2.80\python c:\Program Files\Blender Foundation\blender-2.80.0\2.80\python\bin\python.EXE: No module named pip.main; 'pip' is a package and cannot be directly executed

################################################################################

could not install ptvsd ################################################################################

Saved session recovery to 'C:\Users\maybites\AppData\Local\Temp\quit.blend' The terminal process terminated with exit code: 1

maybites avatar Mar 10 '19 14:03 maybites

Can you check if the same problem happens when you use the portable Blender version? (not the installer) Or did you copy Blender into the Program Files folder manually?

Unfortunately, I don't know what causes this error yet.

JacquesLucke avatar Mar 10 '19 14:03 JacquesLucke

I installed it manually from the zip

but before I failed with the above issue, I had to set the security access to the python-folder inside the 2.80 folder

I also added the 'pip'-folder inside python/site-packages

strangely on a different win10 machine I was able to make your script work by simply changing the security access to the 'python'-folder. (without adding the pip folder manually).

maybe its a security access issue? I will investigate further..

maybites avatar Mar 11 '19 15:03 maybites

Got the same issue here.

pwrman64 avatar Mar 14 '19 16:03 pwrman64

I just unpacked the blender 2.8 archive into my downloads folder and not into windows' programs folder. Blender starts from VS Code without problems. It installed pip, ptvsd and flask.

OlafHaag avatar Mar 15 '19 23:03 OlafHaag

Same, @OlafHaag . Having a copy of my blender 2.80.0 directory in my win10 Downloads folder allowed everything to work smoothly without permissions issues. Prior to this I couldn't get it running at work or home no matter what permissions I tried to force on things. I am guessing any public win folder would do it.

markbehm71 avatar May 19 '19 16:05 markbehm71

I got the same issue. For me it was solved by starting VS Code as administrator.

postvak avatar Aug 03 '19 15:08 postvak

I had the same issue. Can confirm that running VS Code as admin solved the problem 👍

Zorobay avatar Jan 23 '20 12:01 Zorobay

hey, thank you. running vscode as admin sorted it out.

Codelito avatar Jun 06 '20 19:06 Codelito

Running as Admin worked for me as well, thanks Zorobay

paulb5352 avatar Oct 20 '20 13:10 paulb5352

Are you sure running VSCode as admin is a good idea? Given the nature of how it loads 3rd party extensions, that could be a major vulnerability.

Igrium avatar Jan 13 '21 04:01 Igrium

Are you sure running VSCode as admin is a good idea? Given the nature of how it loads 3rd party extensions, that could be a major vulnerability.

That was my worry. Dropping a copy/link of whatever Blender vers I need into Documents felt safter. Still working for me.

markbehm71 avatar Jan 13 '21 15:01 markbehm71

That was my worry. Dropping a copy/link of whatever Blender vers I need into Documents felt safter. Still working for me.

How do you do that? My copy is having trouble accessing %appdata%, which is immovable to my knowledge.

Igrium avatar Jan 13 '21 18:01 Igrium

That was my worry. Dropping a copy/link of whatever Blender vers I need into Documents felt safter. Still working for me.

How do you do that? My copy is having trouble accessing %appdata%, which is immovable to my knowledge.

Sorry - I mean I have a copy of Program Files/Blender Foundation/blender-2.91 (as well as 2.83) into my Documents folder, which is more permissive folder in Windows. You have to point the VSC plugin prefs to that location. My development folder (actual addons or scripts) is elsewhere - in my case not in my config/ folder. It's location doesn't seem to matter as I believe the plugin is taking care of a linked copy in the appropriate spot.

markbehm71 avatar Jan 13 '21 18:01 markbehm71

I have the same issue but only for 2.83.12 It was fine for 2.83.9 or 2.83.10 after this happen. But I didn't noticed what really happpened. 2.80, 2.91 run fine. run VSCode as admin or moving the folder elsewhere don't fix the problem.

found bundled python: d:\Blender\blender-2.83-windows64\2.83\python
unknown argument, loading as file: -m
Error: Cannot read file 'd:\Blender\blender-2.83-windows64\-m': No such file or directory
Error: argument has no '.blend' file extension, not using as new file, exiting! d:\Blender\blender-2.83-windows64\-m
Saved session recovery to 'C:\Users\Admin\AppData\Local\Temp\quit.blend'

Blender quit

################################################################################
>   could not install ptvsd
################################################################################

Saved session recovery to 'C:\Users\Admin\AppData\Local\Temp\quit.blend'
The terminal process "d:\Blender\blender-2.83-windows64\blender.exe '--python', 'c:\Users\Admin\.vscode\extensions\jacqueslucke.blender-development-0.0.14\pythonFiles\launch.py'" terminated with exit code: 1.```

zNightlord avatar Feb 27 '21 17:02 zNightlord

I found another solution since running as administrator or changing the directory didnt do the job for me either.

Solution 1 (tested with Blender 2.80rc3 zip extracted, "Program Files/Blender Foundation" folder): Open vs Code Install Blender Development version 0.0.12 Then do "Blender:start" Opened fine with Addon Now change back to version 0.0.14 -> Still working

Solution 2 (tested with Blender 2.80 msi installer, also "Program Files/Blender Foundation" ): Do the same just start vs Code as administrator.

I hope this fixes the issue for other people. Also this should be good information for bugfixing.

3DHerbie avatar Mar 14 '21 11:03 3DHerbie