Tutorial for setting up python with access to libraries | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Tutorial for setting up python with access to libraries

Hi, I've been teaching myself python with sololearn and a book called "crash course in python". I'm not a programmer and not really trying to be one.. I just work with large datasets and am sick of stuffing around in Excel etc.. so far it has been great learning a new thing. The book got me to set up sublime text as my editor on PC. Now I'm at a stage wanting to use NumPy, Pandas, openpyxl etc.. and I can't get sublime to find these. I have downloaded them and put them in the scripts folder, but it doesn't work. I've tried updating path etc.. but to be honest this sort of stuff starts to get out of my comfort zone Can anyone point me to a resource that explains the set up process in clear terms for a total novice.

30th Jun 2022, 1:04 AM
Jack
12 Answers
+ 2
Aah... I'm not quite sure but isn't Sublime a text editor? Depending on the OS you use, you can use that system's shell program to do pip installs. For example cmd or bash etc. Or just Python shell itself. There are even many Youtube vids on this. https://docs.python.org/3/installing/index.html https://youtu.be/FKwicZF7xNE
30th Jun 2022, 1:42 AM
Korkunç el Gato
Korkunç el Gato - avatar
+ 2
If you have already set your environment variable for python, then directly you can held over to cmd, use a pip (used to install multiple different packages/libraries) so for downloading numpy you write pip install numpy pip install pandas Etc
30th Jun 2022, 3:15 AM
Satyam Mishra
Satyam Mishra - avatar
+ 1
Thanks Satyam, I have tried that already. Pip installs everything fine.. and I can use the programs from python in the cmd window (>>>).. but running from sublime says it can't find those files. Sublime has been able to access/run all the standar python stuff Also thanks korkunç too.. I will check out those links
30th Jun 2022, 3:19 AM
Jack
+ 1
Sublime is a beginner friendly text editor, so I don't think it will be more proficient to use it in long run, however it depends on your comfort and convenience.
30th Jun 2022, 3:23 AM
Satyam Mishra
Satyam Mishra - avatar
+ 1
Ahm you can try vs code for all major languages or pycharm specifically for python
30th Jun 2022, 4:15 AM
Satyam Mishra
Satyam Mishra - avatar
+ 1
This sounds Sublime related, then as you've already added Python to path and installed the modules using pip. Oleg in this SO link mentions sublime interpreter choice being different than that of the one used for console: https://stackoverflow.com/questions/61359005/python-modules-not-found-in-sublime-ide The user then confirms it and posts another link, for Ubuntu. The problem is the same on principle though. Maybe you'd wanna have a look.
30th Jun 2022, 11:59 AM
Korkunç el Gato
Korkunç el Gato - avatar
+ 1
Never mind
30th Jun 2022, 1:37 PM
Satyam Mishra
Satyam Mishra - avatar
0
Do you have any reccomendations for an alternative?
30th Jun 2022, 3:31 AM
Jack
0
So I downloaded pycharm and it all just works out of the box! I feel stupid now. Must have been an issue with how I set up sublime Thanks Satyam and Korkunç for your help and suggestions!
30th Jun 2022, 12:58 PM
Jack
0
Jack It seems your problem is solved. But I want to tell you that "Sublime Text" is a text editor not a IDE(Integrated Development Environment). Auto-completion is available in a IDE, that is it reads your code and check all imported modules and their functions and gives you suggestion as you type and show all available function in a module as you type initials of function name. As an IDE also runs code, so the python environment is already setup during installation like in Python IDLE, Pycharm, Spyder, etc But in case of a text editor it not automatically possible to do so. So the developer introduced "Extensions" or "Packages" in Text Editors that allowed the use of features like auto-completion, error detection, auto-indentation, etc. (In Sublime Text, to use such features you have to install packages like Python, Anaconda in Sublime to make it work* like a IDE)
1st Jul 2022, 7:33 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
Install pycharm idle, then from the packagr install thos module that you want
1st Jul 2022, 9:40 PM
Ali Mohammadnia
Ali Mohammadnia - avatar
- 1
I'm lacking of knowledge about that
30th Jun 2022, 4:56 PM
Dionisio Gulbi
Dionisio Gulbi - avatar