Installer error “Could not figure out what path to use”
OBrara,
Welcome to the ActiveState Platform!
Can you provide some more context for the error message you’re seeing? re:
- Which OS & version are your working on?
- Which language & version are you working on?
- What we you trying to accomplish when you saw the error message? ie., it seems that you were trying to install something, but it’s not clear whether you were you using an installer or a script. If using a script, can you provide the install script?
- Was that the only error message? If not, can you provide the entire error message?
Thanks,
-Windows 10
-Python3.10.4
-I was trying to install activestate for the first time and this happened
-I dont think it helps but it says “exit status 1” as well
OBrara,
Looking at your account on the ActiveState Platform, I can see the Python 3.10.4 for Windows you are trying to install.
To perform the install, you should be running the following at a CMD prompt. In other words, click the Search icon in the lower left hand Windows 10 desktop, type CMD, and hit return. Then paste the following and hit return:
powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/2080745363.1499703358_pdli01/install.ps1'))) -c'state activate --default 0Brara1/Python-3.10.4-Windows'"
I just ran that install command and had no problem. Can you verify that this is the process you followed?
Yes, I have pasted this on cmd and I get
• Preparing Installer for State Tool Package Manager...√ Done
State Tool Package Manager is already installed at C:\Users\X\AppData\Local\ActiveState\StateTool\release\bin\state.exe. To reinstall use the --force flag.
Running `state activate --default 0Brara1/Python-3.10.4-Windows`
█ Creating a Virtual Environment for your Project's Packages
Something Went Wrong
────────────────────
x Could not figure out what path to use
@0Brara1 Could you try running the following command (in cmd.exe):
set VERBOSE=true
state activate 0Brara1/Python-3.10.4-Windows
Then share the output you’re getting.
This should give us more information about why it can’t find a path to install to.
Thanks!
(PID 6976) [DEBUG Jun 14 20:58:33.895271800, main.go:150] ConfigPath: C:\Users\X\AppData\Roaming\activestate\cli-release
(PID 6976) [DEBUG Jun 14 20:58:33.895271800, main.go:151] CachePath: C:\Users\X\AppData\Local\activestate\cache
(PID 6976) [DEBUG Jun 14 20:58:33.896241400, exeutils.go:149] Executing: C:\Users\X\AppData\Local\ActiveState\StateTool\release\bin\state-svc.exe [start]
(PID 6976) [DEBUG Jun 14 20:58:33.898235900, errors.go:86] Wrapped localized error: File could not be found -- with: could not find file=[NOTICE]activestate.yaml[/RESET] in path=[NOTICE]C:\Program Files (x86)\Microsoft Visual Studio\2017\Community[/RESET]
(PID 6976) [DEBUG Jun 14 20:58:33.899234600, errors.go:113] Wrapped input error: <nil> -- with: No activestate.yaml file exists in the current working directory or its parent directories.
(PID 6976) [DEBUG Jun 14 20:58:33.921849800, subshell.go:99] Detected SHELL: cmd
(PID 6976) [DEBUG Jun 14 20:58:33.922355000, subshell.go:131] Using binary: C:\Windows\System32\cmd.exe
(PID 6976) [DEBUG Jun 14 20:58:33.922412800, errors.go:86] Wrapped localized error: File could not be found -- with: could not find file=[NOTICE]activestate.yaml[/RESET] in path=[NOTICE]C:\Program Files (x86)\Microsoft Visual Studio\2017\Community[/RESET]
(PID 6976) [DEBUG Jun 14 20:58:33.923491200, errors.go:113] Wrapped input error: <nil> -- with: No activestate.yaml file exists in the current working directory or its parent directories.
(PID 6976) [DEBUG Jun 14 20:58:33.923491200, secrets.go:61] secrets-api scheme=https host=platform.activestate.com base_path=/api/secrets/v1
(PID 6976) [DEBUG Jun 14 20:58:33.926136600, errors.go:86] Wrapped localized error: File could not be found -- with: could not find file=[NOTICE]activestate.yaml[/RESET] in path=[NOTICE]C:\Program Files (x86)\Microsoft Visual Studio\2017\Community[/RESET]
(PID 6976) [DEBUG Jun 14 20:58:33.926642000, errors.go:113] Wrapped input error: <nil> -- with: No activestate.yaml file exists in the current working directory or its parent directories.
(PID 6976) [DEBUG Jun 14 20:58:33.926642000, secrets.go:61] secrets-api scheme=https host=platform.activestate.com base_path=/api/secrets/v1
(PID 6976) [DEBUG Jun 14 20:58:33.929502100, autoupdate.go:121] Not running auto updates because we just freshly installed
(PID 6976) [DEBUG Jun 14 20:58:33.930004700, instance.go:117] Setting config: auto_update_lastcheck
(PID 6976) [DEBUG Jun 14 20:58:33.941293900, deprecation.go:201] Using cached deprecation information
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, svcmanager.go:57] Waiting for state-svc
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, svcmanager.go:59] Attempt 1
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, cmdcall.go:50] cmdcall
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, activate.go:94] Activate 0Brara1/Python-3.10.4-Windows,
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, svcmanager.go:57] Waiting for state-svc
(PID 6976) [DEBUG Jun 14 20:58:33.953843100, svcmanager.go:59] Attempt 1
█ Creating a Virtual Environment for your Project's Packages
(PID 6976) [DEBUG Jun 14 20:58:33.957948000, instance.go:117] Setting config: projects
(PID 6976) [DEBUG Jun 14 20:58:33.969327500, instance.go:117] Setting config: projects
(PID 6976) [DEBUG Jun 14 20:58:33.981367800, errs.go:74] Wrapped error: mkdir C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows: Erişim engellendi. -- with: MkdirAll failed for path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows
(PID 6976) [DEBUG Jun 14 20:58:33.981367800, errors.go:86] Wrapped localized error: MkdirAll failed for path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows -- with: Could not figure out what path to use.
(PID 6976) [DEBUG Jun 14 20:58:33.981985400, errs.go:74] Wrapped error: <nil> -- with: Could not figure out what path to use.: MkdirAll failed for path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows: mkdir C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows: Erişim engellendi.: Erişim engellendi.
(PID 6976) [DEBUG Jun 14 20:58:33.983699300, errs.go:74] Wrapped error: <nil> -- with: Could not figure out what path to use.
MkdirAll failed for path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows
mkdir C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows: Erişim engellendi.
Erişim engellendi.
(PID 6976) [CRITICAL Jun 14 20:58:33.983699300, errors.go:105] Returning error:
Could not figure out what path to use.
MkdirAll failed for path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows
mkdir C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Python-3.10.4-Windows: Erişim engellendi.
Erişim engellendi.
Created at:
D:/a/cli/cli/internal/runners/activate/activate.go:github.com/ActiveState/cli/internal/runners/activate.(*Activate).run:103
D:/a/cli/cli/internal/runners/activate/activate.go::90
D:/a/cli/cli/cmd/state/internal/cmdtree/activate.go:github.com/ActiveState/cli/cmd/state/internal/cmdtree.newActivateCommand.func1.1:83
D:/a/cli/cli/internal/sighandler/awaiting.go:github.com/ActiveState/cli/internal/sighandler.(*sigHandler).WaitForFunc.func1:46
C:/hostedtoolcache/windows/go/1.16.15/x64/src/runtime/asm_amd64.s:runtime.goexit:1371
(PID 6976) [DEBUG Jun 14 20:58:33.983699300, log.go:184] goroutine 1 [running, locked to thread]:
runtime/debug.Stack(0x4, 0x1458c11, 0x8)
C:/hostedtoolcache/windows/go/1.16.15/x64/src/runtime/debug/stack.go:24 +0xa5
github.com/ActiveState/cli/internal/logging.Critical(0x148ca3e, 0x22, 0xc0000228e0, 0x2, 0x2)
D:/a/cli/cli/internal/logging/logging.go:312 +0x9c
main.unwrapError(0x16af620, 0xc000322a00, 0x4, 0x1, 0xc0001d3b00)
D:/a/cli/cli/cmd/state/errors.go:105 +0x865
main.main()
D:/a/cli/cli/cmd/state/main.go:117 +0x7a7
Something Went Wrong
────────────────────
x Could not figure out what path to use
@0Brara1 it appears the issue is that you do not have permission to write to C:\Program Files (x86)\Microsoft Visual Studio\2017\
.
There’s a few things you can do:
- Give your user write permission to the above dir.
- Install to a different directory by using the
--path
flag. - Install with admin privileges (not recommended, this often results in more permission issues down the line).
I will also ensure that we fix the error message returned such that it clearly conveys the cause of the error (ie. not having permission to write to the target dir).