Reputation: 1039
I had python installed from the official Python.org installer but afterward I installed Anaconda. Now when running the script Powershell is not using Anaconda's version of Python but the previously installed version. I already changed the environment path but still the problem persists. How can I make Powershell to use Anaconda's version of Python?
Upvotes: 4
Views: 4691
Reputation: 1039
Fix the problem by changing the path directly on Powershell in which C:\Python27 is after C:\Anaconda;C:\Anaconda\Scripts. Check current path using:
(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
And create a new path using:
$newPath=’Write new path’
Change to new path:
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH –Value $newPath
Upvotes: 1