I installed python long back and worked fine for all these months, I could install libraries from command prompt..run python programs using shell from vba until one day..It started failing, I am able to run python scripts from idle but not from command prompt or vba. I have tried checking my permission but to no success.
If I type python on command prompt, it says the app can't run on this pc and later "Access Denied" displays on the prompt.
To someone who might find this: I had the same problem, when I checked the python.exe file located at C:\Users{your user}\AppData\Local\Programs\Python\Python37 it had 0 bytes, I just reinstalled it to solve the problem, I don't know how this happened.
Related
I want to run python on vscode terminal but when i try to do so i get the following:
I use the code runner extension and i am enabling 'run code in terminal'option.
It used to work for me, but i have tried recently to run python on windows terminal by copying the entire thing vscode generates in it's terminal when building the executable(the path and everything) and pasting it to windows terminal, didn't work.
This is what i pasted: C:\Users\Yan\AppData\Local\tmc\vscode\mooc-programming-22\part05-27_letter_square> python -u "c:\Users\Yan\AppData\Local\tmc\vscode\mooc-programming-22\part05-27_letter_square\src\letter_square.py"
Please tell how to fix this and if what i did is the cause, then tell me also how to run python on windows terminal without causing this problem.
The command pasted to the windows terminal has somehow created a file named "python" (with no extension) in the "System32" folder.
Delete the file and the problem is solved.
I am doing a research project that involves me running terminals in the Anaconda Command Prompt. I was able to install and work the current version of Anaconda (4.12) and get the command prompt running there, but I had to depreciate my version of Anaconda to 4.2 so I can work on my project using Python 3.5. That version of Anaconda could not open the Anaconda Command Prompt or the Anaconda Navigator on my machine, so I tried reinstalling the current version of Anaconda after uninstalling 4.2; however, now I have the problem where the Anaconda Command Prompt can't open (but I've been able to run Anaconda Navigator). I tried doing the following things to see if I could fix this issue:
Opening the Anaconda Command Prompt through the Windows Command Prompt; however, now I have the added problem of the Windows Command Prompt not opening (which I tried fixing in the steps below)
Running the command prompt in Windows Safe Boot Mode. This method did open the command prompt, but it opened it up under the wrong letter drive. On this mode, I get the directory:
X:\windows\system32
What confuses me is that I don't even have an X: drive on my machine.
Trying to use some of the commands I was going to use in the command prompt in Powershell; however, when I opened powershell, I got an error message regarding Execution Policies. I was able to get the error fixed by changing some of the Execution Policies. I changed the execution policy on CurrentUser and LocalMachine to Unrestricted. This solved the problem on Powershell, but didn't fix the problem with opening the command prompt.
Going back into the Safe Boot Mode Command Prompt and seeing if the letter drive had been fixed to the default C:. The letter drive is still X:.
I don't know what to do to fix this problem. I've tried many of the things I read online from windows and other forums, but so far they haven't worked.
I had the same issue, here is the solution (extracted from Microsoft Assistance Service):
The fix was to open Registry Editor by searching "regedit" in the start menu, then search for "autorun" in the Edit tab, and delete the "autorun" file from the system through right click.
The offending "autorun" element is located under the key:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
and contains an errorneous value if exists which prevented cmd.exe from starting properly.
I've written a script in Python to execute an external .sql file and export the results to Excel. I've written the script in Spyder(Python 3.6). When I run the complete file in Spyder, it runs and exports the data to Excel with no errors. I've tried to run the script in Anaconda Prompt, but I get an error relating to the Sybase ODBC Driver.
I've investigated this error, however I don't understand why it's not appearing when the code is run within Spyder, only when run in the Anaconda prompt. Is there a way to check if these environments are different?
I've investigated this error by searching the internet, however I don't understand why it's not appearing when the code is run within Spyder, only when run in the Anaconda prompt. Is there a way to check if these environments are different? Ideally, I'd be able to run my script on the command line, not only through an IDE.
The error that I get from the Anaconda Prompt is the following:
"pyodbc.Error: ('ZZZZZ', "[ZZZZZ] [Sybase][ODBC Driver][Adaptive Server Enterprise]The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.\n (2762) (SQLExecDirectW)")
"
I expect that running the script in Anaconda Prompt should give the exact same results (no error, successful export to Excel file) as when doing so in Spyder.
My linux distribution(Opensuse 42.2) comes with python 2.7 already installed, however I installed python3 on top of that. And in order to launch IDLE to run the python3 shell, I was told to install "python3-tools" and then just run "idle3" in terminal to launch the shell. However running "idle3" in terminal only brings up an error message, and I can't find any other suggestions. Any help would be extremely appreciated.
** I have fixed the problem. The sources that I found gave me the improper package name. After searching the main-repository for Opensuse, the proper package name for python3 IDLE was "python3-idle".
After fumbling with some keys on my keyboard while trying to get a script to run by clicking on Run in python IDLE I must of did something, because now python will not open. It opens from the command prompt fine, but the normal way it will not open whatsoever. I tried repairing and reinstalling. Still no luck. I am on Windows 7 machines 64bit, using the 32bit version of python 2.7. No idea what it could be but I did find something on google that mentioned something about keybindings or something? Please help!
try executing C:\path\to\python.exe -m idlelib.idle in command prompt, is there any error message?