Posts: 7,313
Threads: 123
Joined: Sep 2016
Aug-13-2017, 04:26 PM
(This post was last modified: Aug-13-2017, 04:26 PM by snippsat.)
(Aug-13-2017, 04:13 PM)hbknjr Wrote: If you correctly added python34 to the path and changed the python.exe name to python3.exe, You should be able to execute your seq.py file by typing following in CMD. Should never do this @ hbknjr.
Advisable for Windows is to have one main version that you run with python my.py in case over will 3.6 to run.
If use other version use py -version , py -2.7 my.py use Python 2.7 to run.
Posts: 2,953
Threads: 48
Joined: Sep 2016
Aug-13-2017, 04:32 PM
(This post was last modified: Aug-13-2017, 04:33 PM by wavic.)
Well, Windows has a PATH env. variable, right? So there is something called shortcuts, right? So make a shortcut in the PATH directory and let's point to the Python executable. Doesn't matter where is installed.
Posts: 7,313
Threads: 123
Joined: Sep 2016
Aug-13-2017, 04:50 PM
(This post was last modified: Aug-13-2017, 04:51 PM by snippsat.)
(Aug-13-2017, 04:32 PM)wavic Wrote: Well, Windows has a PATH env. variable, right? So there is something called shortcuts, right? The point @ wavic is that Python 3.6 add to path automatically under installation.
[Image: 4Qfi5o.jpg]
Then when use python my.py from command line it use 3.6 to run.
And pip command will install to 3.6
All other version can be run with py -version
py -3.4 my.py will run code in 3.4.
py -2.7 my.py will run code in 2.7.
py -3.4 -m pip install requests will install Requests to 3.4
This way it easy to access all version,and using python it will use 3.6 which should be main version on OS.
Posts: 1,298
Threads: 38
Joined: Sep 2016
Another way, I believe, is to add a shebang line at the beginning of the script. Then double clicking the " my_file.py" in Windows or typing "./ my_file.py" in Linux with run the correct version.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 11
Threads: 5
Joined: Aug 2017
(Aug-12-2017, 11:07 PM)Regulus Wrote: Could the problem be my python environment? I code in Notepad++ and run the program at a DOS prompt. Here are the last few lines of my output with the new print command you kindly provided:
n = 496 and c = 3.0
n = 497 and c = 3.0
n = 498 and c = 3.0
n = 499 and c = 3.0
(Aug-13-2017, 04:15 PM)snippsat Wrote: Some advice follow my link over and install Python 3.6.
Restart Pc. I will do that as soon as I resolve the problem I mentioned in post #8 (it got hidden inside other quotes). My Windows 7 doesn't install anything I download from the internet. The downgrade from Win 10 back to Win 7 somehow ruined that feature. I've asked how to fix it on Seven Forums, but no reply yet.
Posts: 12,025
Threads: 484
Joined: Sep 2016
Quote:My Windows 7 doesn't install anything I download from the internet.
Why? What are your permissions?
This sounds like a very restricted, or worse yet, corrupted operating system
Posts: 11
Threads: 5
Joined: Aug 2017
(Aug-14-2017, 12:01 AM)Larz60+ Wrote: Quote:My Windows 7 doesn't install anything I download from the internet.
Why? What are your permissions?
This sounds like a very restricted, or worse yet, corrupted operating system I must be missing an installation driver. It was working fine before the "upgrade" to Win 10, then I realized my computer isn't built for Win 10. The one thing I seem to have lost after switching back to Win 7 is the ability to install software I download online. Everything else is fine.
How do I check my permissions?
Posts: 12,025
Threads: 484
Joined: Sep 2016
Quote:How do I check my permissions?
There - right click the folder that you want to view permissions on.
- Click properties
- Click security (this is a tab)
- View permissions in the second box
This is only useful if you are doing a few selected directories.
To do bulk reset, see: https://social.technet.microsoft.com/For...rosecurity
Posts: 1,298
Threads: 38
Joined: Sep 2016
Aug-14-2017, 12:25 PM
(This post was last modified: Aug-14-2017, 12:25 PM by sparkz_alot.)
It's been awhile since I've used MS 7, can you right click on the downloaded file and select "Run As Administrator"?
You should also be able to go into Control Panel --> User Accounts and verify that you are in the Administrator group. If it's not listed, you may have to login as the actual Administrator in order to add you to the group. While logged in as Administrator, can you install programs?
Note that the Administrator account may be "hidden" (the default) here is one link to show how to activate it:
Activate Hidden Admin. Make sure you "hide" it again when you are done.
EDIT: I should add, whether posting on this site or another, you should copy and paste any error code in it's entirety, this helps us or others understand what is actually going on. In your case, if you cannot install a file, MS will usually generate an 'error code', which can be looked up online and give you at least an idea of what is happening.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 3,458
Threads: 101
Joined: Sep 2016
(Aug-13-2017, 08:51 PM)sparkz_alot Wrote: Another way, I believe, is to add a shebang line at the beginning of the script. Then double clicking the "my_file.py" in Windows or typing "./my_file.py" in Linux with run the correct version.
Double clicking in windows works with file associations and the .py extension. The shebang, in windows, is only used by the windows-specific python launcher, to switch to a different version of python if windows tries to use the wrong one. It won't start python if windows doesn't already know that it should be starting python.
|