4
I’m trying to run a python file, but it asks to be run as admin as q do this?
4
I’m trying to run a python file, but it asks to be run as admin as q do this?
4
Run Command Prompt or Powershell with Run as Administrator option.
Run the command normally:
> python seu_script.py
In Terminal, use:
> sudo python seu_script.py
0
that’s right
python python_script.py
in windows
and
su
bash
chmod +x python_scrypt.py
sudo python python_script.py
in linux/osx
to install python modules (let’s assume, google’s tensorflow, for example), you will need to use as commands:
pip install myPythonExtenson
this for python 2
for python 3 should run
pip3 install myPythonExtension
The difference between your reply and previously given is only indicative of how to install modules via pip
. Since it is not part of the scope of the question, you can convert this answer into a comment of the other answer if you judge even if this information is pertinent to the topic.
I would do it gladly, but I don’t have a sufficient score yet, to put comments
for hchmar with "python" in front, you do not need "chmod + x" - chmod is for when you want to run the command directly by its name.
Browser other questions tagged python
You are not signed in. Login or sign up in order to post.
Windows, Linux or Mac?
– Leonel Sanches da Silva
I use the Windows
– Mokona