So I am trying to deploy a python Django project on windows server 2012R2. But when trying to run the command I get this error.
When trying to open the link in IIS manager it show error 500.
I am running command prompt as administrator but that did not solve the problem.
Python version:3.8.8
IIS 8
If you need to know version of any other library to answer please comment.
Try to run the wfastcgi-enable.exe in command prompt as system administrator
write "cmd" on windows start, then right click and run the command prompt as administrator. then go to the directory where your python environment install the fastcgi . then run the wfastcgi-enable.exe command
That is how I made it work.
Related
We are using jenkins to run a python script through command prompt. The command is like C:\Program Files\...\someapp.bat test.py. The someapp.bat is a customized python and it has a library called arcpy. The test.py file includes a statement import arcpy.
This command works fine on command prompt on the machine. However, when running through Jenkins, it complains arcpy does not exist. Then I used ssh to access the machine and ran the same command. It has the same error. Then I compared the path in the two command prompts (on machine and ssh), the environments has only one difference which is the Windows. One under user folder and the other under system. But it does not seem to be a dependency of the python bat.
So, in general, what's difference between a remote command line window and a local command line window if logged in as the same user? Any clue is helpful!
I want to edit python with atom and be able to run script. But when I do it says that python is not an external or internal command. I know what the problem is that when I search command prompt for the version of python is says "command not found" I have to search py --version. so I've read in the forums that I need to configure the script package but I don't know what to do after clicking on configure script.
I am new to stackoverflow, very new to Python and trying to learn Django.
I am on Windows 10 and running commands from powershell (as administrator).
I am in a virtual environment. I am trying to set up Django.
I have run the following commands
"pip install Django"
"django-admin.py startproject learning_log ."
"python manage.py migrate"
All of the above seemed to work okay, however, when I then try to run the command
"python manage.py runserver"
I get a popup error box that says:
Python has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.
Can someone tell me how to resolve this issue or where to look for any error messages that might clue me in as to what is causing the problem?
I finally got the "python manage.py runserver" command to work. The only thing different I did was before setting up the virtual env and installing Django was set my executionpolicy to Unrestricted. Previously it had been set to RemoteSigned. I hadn't been gettiing any warning or errors but thought I would try it and it worked.
I encountered the same problem. After trying everything, I switched from PS to cmd, cd to the same directory and run python manage.py runserver. Then it worked. Then I ctrl+C quit the server, switched back to PS, ran the command, it still threw the same dialog window (Python stopped working). Then I went back to cmd, typed the command and the server started fine.
Conclusion: Use cmd to run the command, not PS.
when i try to install python i'm getting the "targetdir variable must be provided when invoking this installer" whilst attempting to install python 3.5. I have used tried to Run as admin however, I', still getting this error.
I had the same problem today and it did not work even with "run as administrator".
To solve the problem, I ran powershell as administrator and executed the following command:
python-3.6.1.exe InstallAllUsers=1 TargetDir="c:\python3.6"
Just right click on exe file and run as a administrator.It worked for me :)
I met this issue also.
I find method to resolve it.
Right click the exe file and choose run as administrator.
Then it can go on installing and to be successful.
Run as administrator solves this problem!
I was trying to install the latest python for windows python-3.7.0b4-amd64-webinstall but got the same error.
The problem was solved by the following steps:
Open command prompt in administrator mode.
Go to the location where the installer is downloaded.
C:\>cd C:\Users\XYZ\Downloads
C:\>python-3.7.0b4-amd64-webinstall.exe TargetDir=C:\Python37
The installer will open and chose the default installer and click Install.
Using Python version 3.5 on Windows 10 64bit,
I'm unable to run the pip command. When I try running the application, the window will just open for a brief second and then closes.
I already tried adding the directory to the PATH environment variable and rebooting the system - didn't work.
when i try running the application the window will just open for brief second and then closes
Sounds like you are trying to open the pip.exe file and expect an interactive interface of some kind.
Unfortunately, that's not how you use pip. Open up a cmd, type your pip commands there. The command prompt will print and error, and not close, if there is a problem.