Results 1 to 9 of 9

Thread: Installing and running Python programs

  1. #1

    Tyler Durden's Avatar
    Joined
    Nov 2018
    Posts
    75
    Userbars
    2
    Thanks
    83
    Thanked
    29/18
    DL/UL
    29/0
    Mentioned
    3 times
    Time Online
    7d 22h 28m
    Avg. Time Online
    5m

    Installing and running Python programs

    Hi guys,
    Lately I've witnessed quite a few questions from folks regarding running python programs.
    I didn't see a guide for the same so I decided to make one myself.
    I will be setting up python 2 as well as python 3.
    Feedback is appreciated as it helps me improve future guides

    Here we go :
    1. Download python installers from their official site.
      (you need an account to see links)
      Kindly refer to the screenshots for the same.
      Kindly note I will be using python 3.6 for this guide as it has tensorflow support.
      Select exe or msi installer for x86-64
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
    2. Now install the files you downloaded from above, once again refer to the screenshots, the selection must be as shown in the screenshots.
      in place of Jack whatever your username on your computer is will be there, Eg: Katie or Mark
      (you need an account to see links)
      Make sure to click on the disable path length limit option. Select it.
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
    3. Now we will be renaming some files to python2 and python3 to be more systematic.
      Eg: In python 2.7 installation folder I will rename python.exe to python2.exe
      Similarly in python 3 installation folder I will rename python.exe to python3.exe
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
    4. Next, we will be adding them to our file path.
      Click on the windows button at bottom left of page and type System Environment Variables.
      An option should show, click on it.
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
    5. Now click on New and enter the paths, follow the screenshots for guidance. Remember the sequence Red -> Green ->Orange.
      New -> Copy Paste the path -> Ok
      Refer to the screenshots for the same.
      (you need an account to see links)

      Open a new file explorer window and go to the python2 install path.
      (you need an account to see links)

      Right click on the file
      (you need an account to see links)
      (you need an account to see links)


      Copy the path and paste it after selecting new
      (you need an account to see links)

      Repeat for Scripts Folder
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
      (you need an account to see links)
    6. Repeat Step 5 for python3 , just remember it's installed at another place, refer to the below screenshot for the same
      (you need an account to see links)
    7. After setting the build paths correctly it should show like this
      (you need an account to see links)
    8. Now lets run a program and see. First navigate to the program folder that you want to run. Then Press and hold SHIFT key and right click. It should show the below options. Kindly note powershell is similar to cmd with some extra features, so it's better if you use it.
      (you need an account to see links)
    9. Pip is something we will use to install python modules such as Pillow, mechanize, etc. Lets now first make sure PIP is upto date else it will give error saying "Unable to create process using '''' "
      Run the following 2 commands
      python2 -m pip install --upgrade pip
      python3 -m pip install --upgrade pip
      Kindly refer to the screenshots for the same.
      (you need an account to see links)
      (you need an account to see links)

      pip2 is for python2 and pip3 for python3 . To install a module simply run pip2 install "modulenameherewithoutquotes" or pip3 install "modulenameherewithoutquotes".
      Here is an example:
      (you need an account to see links)
    10. Now lets finally run the program.
      Remember to run a python 2 program type
      python2 "filenamewithoutquotes".py
      and for python3
      python3 "filenamewithoutquotes".py
      Make sure you are in the same directory as the file you are running.
      To go to a particular directory type
      cd "directorypathherewithoutquotes"
      Eg: cd C:/Python

      Here is an example of me running DailyDoer while being in the same directory
      python2 DailyDoer.py
      (you need an account to see links)
    11. That's it folks. That's how to install python and run python programs.




    If you have any suggestions or need help, feel free to reach out to me, I'm happy to help and constructive feedback is welcome
    Update: Added commands and more explanation for easier understanding.
    Last edited by Tyler Durden; 12-29-2018 at 05:32 AM.
    Guide to install and run Python programs
    (you need an account to see links)

  2. The Following 6 Users Say Thank You to Tyler Durden For This Useful Post:

    Alcremie (12-24-2018),♥ GreyFaerie ♥ (07-17-2020),j03 (12-24-2018),Mama Bear (12-24-2018),Midas (12-24-2018),Pinecone (12-24-2018)

  3. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,756
    Userbars
    176
    Thanks
    5,936
    Thanked
    33,187/6,626
    DL/UL
    23/36
    Mentioned
    3,871 times
    Time Online
    564d 12h 13m
    Avg. Time Online
    3h 12m
    Thanks for sharing this guide! I'm sure it'll help many of those interested in the Python programs released here but not sure how to get them to run. Even if they want to get the second Python version.

    Using an external site like Dropbox or imgur will work better for images.


    Sent from my iPhone using Tapatalk
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  4. The Following User Says Thank You to j03 For This Useful Post:

    Tyler Durden (12-24-2018)

  5. #3

    Tyler Durden's Avatar
    Joined
    Nov 2018
    Posts
    75
    Userbars
    2
    Thanks
    83
    Thanked
    29/18
    DL/UL
    29/0
    Mentioned
    3 times
    Time Online
    7d 22h 28m
    Avg. Time Online
    5m
    Quote Originally Posted by Infamous Joe View Post
    Thanks for sharing this guide! I'm sure it'll help many of those interested in the Python programs released here but not sure how to get them to run. Even if they want to get the second Python version.

    Using an external site like Dropbox or imgur will work better for images.


    Sent from my iPhone using Tapatalk
    Yep I'll do it later. Thanks
    Guide to install and run Python programs
    (you need an account to see links)

  6. #4
    Katie Mama Bear's Avatar
    Joined
    Oct 2014
    Posts
    4,510
    Pronouns
    she/her
    Userbars
    62
    Thanks
    2,478
    Thanked
    7,386/2,232
    DL/UL
    172/0
    Mentioned
    657 times
    Time Online
    182d 5h 28m
    Avg. Time Online
    1h 15m
    Quote Originally Posted by scytherash View Post
    Yep I'll do it later. Thanks
    If you post them in img tags within spoiler tags, it saves having to click links but doesn't stretch the page.

  7. The Following User Says Thank You to Mama Bear For This Useful Post:

    Tyler Durden (12-25-2018)

  8. #5

    Tyler Durden's Avatar
    Joined
    Nov 2018
    Posts
    75
    Userbars
    2
    Thanks
    83
    Thanked
    29/18
    DL/UL
    29/0
    Mentioned
    3 times
    Time Online
    7d 22h 28m
    Avg. Time Online
    5m
    Quote Originally Posted by Bacchus View Post
    If you post them in img tags within spoiler tags, it saves having to click links but doesn't stretch the page.
    Tried it with img src. Not working
    Thanks anyways I guess.

    Update: @(you need an account to see links)
    (you need an account to see links)
    It's increasing the number of clicks so I think it's best we go with it as it is.
    Suggestions are welcome ofcourse
    Last edited by Tyler Durden; 12-25-2018 at 04:44 AM.
    Guide to install and run Python programs
    (you need an account to see links)

  9. #6
    *squeak*
    Bat's Avatar
    Joined
    Nov 2012
    Posts
    4,040
    Userbars
    152
    Thanks
    2,147
    Thanked
    46,709/3,563
    DL/UL
    34/1
    Mentioned
    1,769 times
    Time Online
    644d 1h 41m
    Avg. Time Online
    3h 41m
    Quote Originally Posted by scytherash View Post
    Tried it with img src. Not working
    Thanks anyways I guess.
    The image pseudo-html looks like this: [img]#URLHERE[/img]. You don't need to specify the src attribute. The source is read between the opening and closing tags.

  10. The Following User Says Thank You to Bat For This Useful Post:

    Tyler Durden (12-25-2018)

  11. #7

    Tyler Durden's Avatar
    Joined
    Nov 2018
    Posts
    75
    Userbars
    2
    Thanks
    83
    Thanked
    29/18
    DL/UL
    29/0
    Mentioned
    3 times
    Time Online
    7d 22h 28m
    Avg. Time Online
    5m
    Quote Originally Posted by Odd View Post
    The image pseudo-html looks like this: [img]#URLHERE[/img]. You don't need to specify the src attribute. The source is read between the opening and closing tags.
    Nope man, not working. :/
    Guide to install and run Python programs
    (you need an account to see links)

  12. #8
    *squeak*
    Bat's Avatar
    Joined
    Nov 2012
    Posts
    4,040
    Userbars
    152
    Thanks
    2,147
    Thanked
    46,709/3,563
    DL/UL
    34/1
    Mentioned
    1,769 times
    Time Online
    644d 1h 41m
    Avg. Time Online
    3h 41m
    Quote Originally Posted by scytherash View Post
    Nope man, not working. :/
    That's really bizarre! When I submit this:
    HTML Code:
    [img]https://i.imgur.com/lZEEfkh.png[/img]
    It's rendered like this:



    So what @(you need an account to see links) was suggesting is:
    HTML Code:
    [spoiler][img]https://i.imgur.com/lZEEfkh.png[/img][/spoiler]
    Which is rendered like this:


  13. The Following User Says Thank You to Bat For This Useful Post:

    Mama Bear (12-25-2018)

  14. #9

    Tyler Durden's Avatar
    Joined
    Nov 2018
    Posts
    75
    Userbars
    2
    Thanks
    83
    Thanked
    29/18
    DL/UL
    29/0
    Mentioned
    3 times
    Time Online
    7d 22h 28m
    Avg. Time Online
    5m
    Quote Originally Posted by Odd View Post
    That's really bizarre! When I submit this:
    HTML Code:
    [img]https://i.imgur.com/lZEEfkh.png[/img]
    It's rendered like this:


    So what @(you need an account to see links) was suggesting is:
    HTML Code:
    [spoiler][img]https://i.imgur.com/lZEEfkh.png[/img][/spoiler]
    Which is rendered like this:

    Yep man, I know. It simply prints the tags and the url both.
    Anyways, it's not impacting the guide significantly and I hope it helps many to get started with running programs in python
    Guide to install and run Python programs
    (you need an account to see links)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •