blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

Unable to start Blender on Windows

Open TomasHubelbauer opened this issue 5 years ago • 3 comments

Hi! Thank you for developing this extension, it is exactly what I've been looking for!

I have just installed the extension and attempted to run the Blender: Start command, however, the log in Terminal indicates an error:

> Executing task: c:\Program Files\Blender Foundation\Blender\blender.exe --python c:\Users\TomasHubelbauer\.vscode\extensions\jacqueslucke.blender-development-0.0.12\pythonFiles\launch.py <

Read prefs: C:\Users\TomasHubelbauer\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: c:\Program Files\Blender Foundation\Blender\2.80\python
[]
Collecting pip
  Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 3.1MB/s
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/2c/c5/0d38afb961f83e0d51f319f7dc166195ebabc1ea3cb20a10a77f500f7156/setuptools-46.4.0-py3-none-any.whl (583kB)
    100% |████████████████████████████████| 583kB 3.1MB/s
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\Program Files\\Blender Foundation\\Blender\\2.80\\python\\Lib\\site-packages\\pip'
Consider using the `--user` option or check the permissions.

c:\Program Files\Blender Foundation\Blender\2.80\python\bin\python.EXE: No module named pip

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

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

Terminal will be reused by tasks, press any key to close it.

I think the solution to this error is included in the error message and I've look at the source a bit, but I am not sure if it is the extension which is attempting to run the pip command or Blender itself or what. I will be glad to send in a PR with a fix, but I'll need little hand-holding, some tips where to look. pythonFiles/launch.py seems like it only launches Blender, so I wouldn't know where to pass --user to Pip there.

I am using Blender 2.80. Both Blender and Pip are in my %PATH%.

TomasHubelbauer avatar May 20 '20 21:05 TomasHubelbauer

Administrator permissions are required to install the dependencies when Blender is located in C:\Program Files.

robertguetzkow avatar Aug 03 '20 19:08 robertguetzkow

Thanks! That's exactly the problem I was having!

UncleFirefox avatar Nov 17 '20 00:11 UncleFirefox

Administrator permissions are required to install the dependencies when Blender is located in C:\Program Files.

How come on Windows i get this error while im the Admin? I recently started on windows again after 17yr OSX, need some adaption again. Im the only user with admin rights, not sure i understand why i wont have permissions on this folder?

Edit I just after setting 'Full Control' on Creator and Users part it does seem to work. Still wonder why im not in Admin mode, Windows is really weird and different in that behavior

schroef avatar Mar 19 '21 20:03 schroef