getting started, again - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: getting started, again (/thread-11518.html) Pages:
1
2
|
getting started, again - bluedoor5 - Jul-13-2018 Ok, following on from my intro post/s, as suggested to try the following Quote:Welcome bluedoor5. And Quote:IDLE is still available, and still not very good. There are many IDE's available that are free and very good. VSCode and PyCharm are two of the better ones. If interested in VSCode, see https://code.visualstudio.com/ So I will get back to you when I have read everything, but after a clean up on the PC, I was left with various versions of Python, will post those version numbers soon, to use same or file away. But hope this will be my own "get started from scratch" thread, hope others to may benefit. Any further suggestions most welcomed Thanks Current versions of Python install for win 7 are 2 of python-3.6.5 1 of IDLE Lif 1.1-Py26 1 of beautifulsoup4-4.6.0.tar but seems corrupted, opens in word.doc only. 1 folder named: dist inside that folder a file named : beautifulsoup4-4.6.0 and finally a pdf file named conda-cheatsheet They all did my head in ! RE: getting started, again - bluedoor5 - Jul-13-2018 Ok, have downloaded and installed the latest version python-3.7.0 ( win 7 pro ) IDLE is on task bar, it will open a current .py file. But the .py files on their menu bar don't associate Open With IDLE, it's not there. Secondly, I think it may not be installed right, directory to install was changed to C:\ Maybe I should have created a folder and installed inside that folder ? C:\folder_name\ Python installed here ? RE: getting started, again - snippsat - Jul-13-2018 (Jul-13-2018, 09:06 AM)bluedoor5 Wrote: C:\folder_name\ Python installed here ?You can choose folder like C:\python37 in follow Python 3.6/3.7 and pip installation under Windows(Jul-13-2018, 05:32 AM)bluedoor5 Wrote: beautifulsoup4-4.6.0.tarYou use pip to install all Python modules/libraries.That's why is important that you follow link over,and do test that pip work from anywhere in cmd .cmd: C:\>python -V Python 3.7.0 C:\>pip -V pip 10.0.1 from c:\python37\lib\site-packages\pip (python 3.7) # Install BeautifulSoup C:\>pip install beautifulsoup4 Requirement already satisfied: beautifulsoup4 in c:\python37\lib\site-packages (4.6.0) # Test that it work C:\>python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import bs4 >>> bs4.__version__ '4.6.0' >>> Quote:1 ofIDLE is not good at all. I will suggest maybe the easiest editors/IDE just to get started like PyScripter or Thonny. Then later you should look at editors like VS Code(Free), PyCharm(free communty edtion). My quick review a while back of VS Code. Demo PyScripter you can just write code and Push run button,not even need to save. Then in bottom you hav much better IDLE,where output will be and further testing can be done. RE: getting started, again - bluedoor5 - Jul-13-2018 snippsat Quote:You can choose folder like C:\python37 in follow Python 3.6/3.7 and pip installation under Windows Yeah I missed that bit, ok...Thanks RE: getting started, again - bluedoor5 - Jul-16-2018 I been reading and practicing some stuff, but starting to see a bigger picture. On the question of Librarys, I started to look into a few of them, there seems to be thousands complimented by their authors or script writers. So basically the way I'm starting to see it, instead of writing the same ol same ol scripts, just call a script from the library, right ? If that is the case, looking at my current Excel VBA project that runs OK, eventually I can create my own set of .py Library scripts, and use my own folder to call those scripts ? The goal is to move away entirely from Excel, even create my own GUI ? Thanks RE: getting started, again - snippsat - Jul-16-2018 (Jul-16-2018, 10:00 PM)bluedoor5 Wrote: On the question of Librarys, I started to look into a few of them, there seems to be thousands complimented by their authors or script writers. So basically the way I'm starting to see it, instead of writing the same ol same ol scripts, just call a script from the library, right ?Yes there are two main Standard Library(comes with Python) | PyPi(3-party library). Standard Library: >>> import math >>> >>> # 8^2 in math >>> math.pow(8, 2) 64.0PyPi(here need to us pip to install)Example Requests pip install requests >>> import requests >>> >>> r = requests.get('https://www.python.org/') >>> r.status_code 200 >>> r.encoding 'utf-8' >>> r.headers['date'] 'Mon, 16 Jul 2018 22:25:42 GMT' Quote:If that is the case, looking at my current Excel VBA project that runs OK, eventually I can create my own set of .py Library scripts, and use my own folder to call those scripts ?Yes can create own small libraries and module/packages,there are som stuff to be learn if want to share with world like on PyPi. There are many tools for Excel in Python like Pandas, openpyxl, pyexcel. Pandas with Jupyter notebook is one of the strongest as you get a look similar to excel(can replace Excel all together). Common Excel Tasks Demonstrated in Pandas Python Excel Tutorial: The Definitive Guide RE: getting started, again - bluedoor5 - Jul-19-2018 Quote:C:\python37>>>> import requests OK, I un-installed everything, again. Made new folder as suggested "Python37" and re-installed. Instructions are a bit different for the 3.7 version only slightly, but ran the first script and copy/paste what is on the CMD screen. Seems a lot cleaner to make that own folder. I don't know what this part means though: Quote:The script chardetect.exe is installed in 'c:\python37\Scripts' which is not o RE: getting started, again - nilamo - Jul-19-2018 If you open a terminal, and run the following, what output do you get? python -c "import requests; print(requests)"If it's an error, then that might mean you should fix your PATH. If it's not, then you can ignore the PATH warning. That message is letting you know that the Scripts folder isn't on your PATH, and the PATH is how Windows knows where to look for files. RE: getting started, again - bluedoor5 - Jul-19-2018 Quote:If you open a terminal, and run the following, what output do you get? I get; Quote:C:\python37>python -c "import requests; print(requests)" RE: getting started, again - nilamo - Jul-19-2018 Then your PATH is fine, and you can ignore the warning :) |