Python was not found but can be installed - python-3.x

I have just installed python3.8 and sublime text editor. I am attempting to run the python build on sublime text but I am met with "Python was not found but can be installed" error.
Both python and sublime are installed on E:\
When opening cmd prompt I can change dir and am able to run py from there without an issue.
I'm assuming that my sublime is not pointing to the correct dir but don't know how to resolve this issue.

This isn't a Sublime issue, it's a Windows 10 issue. My Windows 10 boxes don't have this feature so I'm not sure how widely spread it is, but you may want to check out this (seemingly unrelated) question "Permission Denied" trying to run Python on Windows 10.
The general gist from this post is that these new stub redirectors are supposed to direct you into installing some missing applications from the Windows App store and that user-installed versions are supposed to take priority, but depending on how the PATH is modified the system might find the stub versions before your user installed versions.
The currently accepted answer mentions:
The second part of correcting it is to type "manage app execution aliases" into the Windows search prompt and disable the store versions of Python altogether.
It's possible that you'll only need to do the second part, but on my system I made both changes and everything is back to normal now.
In the comments, there are comments from Zooba which further indicate that this is the way to go:
(Microsoft employee and CPython core developer here) You definitely only need to do the second part. There have been a couple of bugs related to upgrading apps resetting aliases which will be fixed in the next stable update, so it should be a one-time fix by then. While you're getting Insiders updates you may need to do it a couple more times.
... And launching the Store is a new feature to help people install Python - if you've added it to PATH using the regular installer it should take precedence over the new redirector, but if not you've discovered above how to disable it.

i had the same problem, so i went to the microsoft store (windos 10) and simply installed "python 3.9" and problem was gone!
sorry for bad english btw

Related

Setting up development environment in Windows 10 without admin rights

Let me give a quick background of the work I do and then I'll explain the problem I am facing.
I am a software developer with more than 15+ years work experience. My work involves a lot of varied tasks:
data analysis using R, Python
development of web applications using Ruby on Rails, JS, etc.
building models using open source libraries
So far, I have been doing all this in my personal laptop (Ubuntu 18.04) and have faced no issues.
But I would soon need to start using a laptop provided by the organisation that I am working for. This org is not a IT company, it's a public body. They only use Windows (10) and don't provide admin access to anyone. It's very hard to get permission to install any kind of "approved" software. Just to give an example, they refused to install Chrome in my laptop as they wouldn't be able to control the updates.
So here's my problem - what do I do to work peacefully using their laptop? The primary reason I have to use the work laptop is that there are a lot of important documents kept in shared drives that are accessible only in their machines.
I have been looking at options like WSL or Hyper-V. But, before I put in a request to the IT team to get them to agree, I wanted to know a few things:
1) Which among WSL or Hyper-V would be the better approach for setting up the dev environment that I want?
2) IF I get the IT team to install WSL/HV, would I be able to set up everything else without having to go back to them for each software? Is there a way of secure local admin access these options would provide that will ease their concerns?
3) Is there some other way of setting up what I want?
If still applicable and actual I can share my solution:
If you should work on a windows machine where you don’t have administrative privileges, you can very easily make a portable R/Rstudio installation.
Download a recent version of R from the CRAN site and the recent version of RStudio. After download extract RStudio installation exec with 7Zip and copy files from $_OUTDIR to the desired location (in case you making an update, simply overwrite all files, that already exist). Your RStudio executable will be in
your-chosen-directory/bin/rstudio.exe
Then run CRAN-R installation, ignore the warning that you don’t have administrative privileges and go forward until installation will complete. Run RStudio, from the menu
Tools->Global Options
locate where your R installation is located.
If you performing an update (more recent version of R), copy all files from the library subfolder of the old R installation into new, but this time DON’T OVERWRITE! This operation vill preserves the packages you have installed in the previous version of R. After copying update all your packages from the RStudio window (Packages->Update). When the packages update process will end check which packages failed to update (You will see warning messages near them in the RStudio console). Remove these packages (write down names of failed packages and delete corresponding folders from library subfolder). For this, you will need to exit from RStudio. After deletion launch RStudio again and execute the packages install command in the RStudio console:
install.packages(c("package1", "package2", "package3"))
Congratulations, You are ready to go!

node.js Setup Wizard ended prematurely in windows 10 64bit

For the last 3 days I have been trying to figure out how to install node.js. I tried every solution that I found on the internet, like disabling certain components during installation, installing both x86 and x64 etc, none of them worked.
My OS is Windows 10 x64. I tried different versions of node.js and they all return the same error shown in the screenshot below.
I tried installing through the command line and got the log. But I could not find anything useful from the log either. Please help.
The log can be found here: this path : https://drive.google.com/open?id=1OkkK36hlQeBX0xTNuOuilGaNr1u3S55e
MSI (s) (74:88) [20:49:45:955]: Executing op: ActionStart(Name=RegisterEventManifest,,)
MSI (s) (74:88) [20:49:45:961]: Executing op: CustomActionSchedule(Action=RegisterEventManifest,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="wevtutil.exe" im "C:\Program Files\nodejs\node_etw_provider.man")
MSI (s) (74:A0) [20:49:45:969]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI33C1.tmp, Entrypoint: CAQuietExec
CAQuietExec: Error 0xc0000409: Command line returned an error.
This is the relevant part of the log and where the install keels over, noise removed. 0xc0000409 is very, very nasty. STATUS_STACK_BUFFER_OVERRUN is a stack corruption error, triggered by code that protects against viral attacks.
Searching for "nodejs install 0xc0000409" takes you to this bug report, notable from December 2015. This issue has been dogging users for a long time, but they are having trouble finding the root cause. The generic workaround is to disable this install step by disabling the installation of the ETW performance counters.
Which works, but is but a band-aid. I think macario1983's comment points at the real troublemaker. It got a lot of helpful votes in just two days. And points at the kind of viral rootkit that programmer's voluntarily install, the kind that can so easily cause a STATUS_STACK_BUFFER_OVERRUN error with no decent way to identify the code that causes it. Anti-malware has become a cure that is worse than the disease, Avast in particular is a truly awful product and does not belong on a programmer's machine.
So decent advice is to 1: disable the anti-malware product before installing Node. 2: get rid of completely if it is Avast. 3: disable the performance counter registration. 4: try the updated installer, patched 4 days ago.
I disabled the AVG antivirus(version 18.4.3056) but not windows firewall and then i was able to install nodejs.
Possible options to solve this:
1. Removing previous installations traces
If you have previous installations, make sure that they were uninstaled completely. If HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{1e2e15d7-3760-470e-8699-b9db5248edd5} record exist in your register, remove it.
2. Disabling Performance Counters
If you don't need Performance counters feature, try to install without it (or maybe even without Event Tracing).
3. Disabling security and giving the full permissions
Clean Temp Folder
Disable your antivirus/firewall for the period of installation.
C:/users/$user/AppData/Local/Temp- Right Click on Temp and go to Properties > select Security Tab > give the user permissions by checking Full Control on permission
Install Node.js
I had today the same problem with Windows 10 64 bit and Node.js 8.11.2: disabling completly Avast just for the time of the installation solved the issue.
I was trying to install Node.js through node-v8.11.2-x64.exe, but it was rolling back every time at the end. The error in the event log was about wevtutil.exe, version 10.0.17134.1
I had the same issue on a Windows 2012R2 server installing node-v8.11.2-x64, and disabled the McAfee anti-virus to no avail. When I went to clean out the TEMP folder as suggested in this thread, I noticed that several files and folders were locked and could not be deleted, so I rebooted the machine (with the anti-virus disabled). After the reboot, I noticed that the locked temp files had been deleted, and I was able to install node.js, including the Performance Counters and Event Tracking options.
I spent one day for that ....Best solutions is download zip example node-v12.16.2-win-x86.zip.

Node.js installation (windows installer) terminates prematurely on windows 10 64-bit

After going through a windows 10 re-installation due to a windows update crashing my laptop, I was left with re-installing many applications. One of them being node.js. When I tried to install it through the windows installer, I kept getting 'setup wizard ended prematurely because of an error message'. I am not sure what the problem is. I used x64 version which is what my OS is and there is no nodejs folder in program files. When I logged the installation this message popped in a lot of the lines has no eligible binary patches. Before the no eligible lines there were error logs such as:
'WixSchedInternetShortcuts: Error 0x8007000d: failed to add temporary row, dberr: 1, err: Directory_'
'WixSchedInternetShortcuts: Folder 'ApplicationProgramsFolder' already exists in the CreateFolder table; the above error is harmless'
If that is not enough information please advice me on how to send the full logs without spamming huge text in the thread. Thank you.
The MSI log file:
https://gist.github.com/luki2000/ab00476127d54aaf610d8bda84d40a64
Maybe try to search the log for "value 3" as explained by Rob Mensching in his blog. Doing so will find the locations in the log file that describe errors of significance.
Many people use dropbox, gdisk or similar to post logs. Some put it on github (just a sample log for OP, leaving in for reference). Check that last link, is that the same problem you see perhaps? (search for "value 3" as explained above - without the quotes of course). Looks like there is an error creating an Internet shortcut. Perhaps that is a Windows 10 problem? I will take a quick look.
I am betting Bob Arnson knows what this problem is outright. He will probably give us the real answer, see below for my workaround.
The correct thing to do overall, would probably be to communicate the problem back to the Node.js guys so they can fix the problem once and for all.
UPDATE: Maybe see if this answer helps you: node.js installer failing with 'CAQuietExec Failed' and 1603 error code on Windows 7. Essentially un-check Event tracing(ETW) in the setup's feature dialog - or you can try to launch the MSI from an elevated command prompt.
UPDATE: There seem to be two Internet shortcuts configured for this MSI in the WixInternetShortcut table. I would just create a transform to remove these two shortcuts and try a reinstall. If you feel bold and fearless and like to break the law, you can delete the two rows from the table and just save directly to the MSI itself. This is never the right thing to do if you are a deployment specialists. The original MSI is sacred, but if this is for your own system and you need to get something done, that would work. Then you just install the MSI direct afterwards. Otherwise you can install the transform after creating it with a simple command line:
msiexec.exe /i node-v8.11.2-x64.msi TRANSFORMS="C:\MyTransform"
You can create the transform using Orca, InstEd or SuperOrca or any commercial tool that supports creating transforms.
In case you don't know, transforms are little database fragments that are applied to the original MSI (which is also a database under the hood). After the transform is applied the in-memory version of the MSI is the MSI + the changes from the transform.

Package Python 3 executable that does not require programming knowledge

I would like to send my Python3 script to my father-in-law and grandmother. Each has their own Windows machine, one is running Windows 7 and the other is running XP.
Not sure how to package it up for them to run on their respective machines. Is there such a method?
My script prompts, while in the IDE environment, for Keyword, path, filename. So there are some inputs, the user has to type in. Not sure if that will affect the portable script creation.
After reading through some responses here on StackOverFlow, I found py2exe does not work with Python 3.
Also Pytonw, suggested here as well, looks very complicated. I don't think either of my relative could carry out those steps.
Lastly CX-Freeze site I get ublock filters-Badware risks and a big warning window when I visit their website.
I've used cx-freeze to deploy python apps compiled to windows .exe files for us by computer novice users for several years and it has worked well. you will occasionally run into issues with dependencies you will have to take extra steps for (Datetime for example) but nothing that isn't surmountable. The easiest way to handle it is to install the folder on the computer yourself and create a desktop shortcut to it for the user. That keeps it simple for them. If you are not close to them you can always use a program like team viewer to gain access to their computer like remote desktop.

AutoHotkey Run command issue in Windows 8.1

this is my first time on such a prestidigious site, so please welcome me by assisting me. I am doing independent development and am primarily a music designer. So that is why I may not sound like a real pro coder but nevertheless truly love creating my music through automative processes.
My present issue is this:
Windows 8.1 Pro
AutoHotkey 1.0.48.5 32bit (running as Admin)
Everytime I attempt to use the command 'RUN' with an .ahk target, I get the expected result except that the .ahk residing folder is opened by MS Explorer. I suspect that something like the fact that AutoHokey is an unsigned app, windows does not want it to run flawlessly. I am now trying a number of Administrative Tool Services disabling, but with no success yet.
RUN C\:XZN\Mecanisms\AnyAHK_script.ahk
;;or
RUN AnyAHK_script.ahk, C\:XZN\Mecanisms
;;or
RUN C\:XZN\Mecanisms\BactchfileLaunchingAboveScript.bat
;;or
RUN AnyAHK_script.ahk, C\:XZN\Mecanisms
Would there be a workaround this at the OS settings level or another way to run/start an .ahk file?
I tried the 'Comspec' approach as well as running an .ahk from within a batchfile, but the .ahk always get intercepted whenever it contains a 'RUN' command requesting an .ahk target.
Thanks.
You are using outdated version of AutoHotkey which is more than 5 years old. Always use AutoHotkey and its documenatation from http://ahkscript.org/ (current uptodate version, new official website)! AutoHotkey and its documentation from autohotkey.com is outdated and you may have some problems using them!
One thing to try if you only have this problem on win 8 is to Enable interaction with administrative programs http://www.autohotkey.com/board/topic/70449-enable-interaction-with-administrative-programs/
That script modifies the executable file's embedded manifest, then creates and installs a self-signed certificate and uses it to sign the file. The executable will not run on any other system, unless you install the certificate used to sign the file.
But lets see some script code that way we have something to test with and can better help you out...

Resources