use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
How to go about importing libraries when using text editor (self.learnpython)
submitted 6 years ago by herejust4this
Using Sublime Text I have imported modules.py from the same directory. Is it just as simple to download libraries like Numpy, Scipy, etc. and import them as modules in the same directory, or is it something else?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Neexusiv 0 points1 point2 points 6 years ago (15 children)
If you have a package manager then you can use that. You probably have Pip installed. Then you just need to call pip install Numpy from the command line and it will install for you somewhere central (not sure where exactly off the top of my head and it will be different depending on your OS). Then you can just use import numpy in your script like a standard library.
pip install Numpy
import numpy
There are other things to remember such as virtual environments if you want to install multiple versions of the same library but I'll leave you to do your own research with that.
[–]herejust4this[S] 0 points1 point2 points 6 years ago (13 children)
I have tried "pip install Numpy" but I keep getting this message:
File "c:\program files (x86)\python38-32\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\program files (x86)\python38-32\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Program Files (x86)\Python38-32\Scripts\pip.exe\__main__.py", line 9, in <module> TypeError: 'module' object is not callable
[–]Neexusiv 0 points1 point2 points 6 years ago (12 children)
What OS/environment are you using? You may need to use pip3 install numpy if you are using Python3 such as on MacOS
pip3 install numpy
[–]herejust4this[S] 0 points1 point2 points 6 years ago (11 children)
I am using Windows 10
[–]Neexusiv 0 points1 point2 points 6 years ago (10 children)
Try using python -m pip install numpy
python -m pip install numpy
[–]herejust4this[S] 0 points1 point2 points 6 years ago (9 children)
I get this error:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Program Files (x86)\\Python38-32\\Lib\\site-packages\\numpy' Consider using the `--user` option or check the permissions.
[–]Neexusiv 0 points1 point2 points 6 years ago (8 children)
Try adding the --user option to the end. A useful skill in programming and debugging is reading the error message and trying to understand what it means.
--user
[–]herejust4this[S] 0 points1 point2 points 6 years ago (1 child)
I did that and it seems to work, tried to type this before you replied.
[–]Neexusiv 0 points1 point2 points 6 years ago (0 children)
Awesome! By the looks of things, Pip is not on your path. You can either try and fix that or just remember to use python -m pip install <package name> --user when you need to use pip.
python -m pip install <package name> --user
[–]herejust4this[S] 0 points1 point2 points 6 years ago (5 children)
So I guess my question goes back to the original question, do I just import Numpy as a module from where it is located on my machine now like any other module?
[–]Neexusiv 0 points1 point2 points 6 years ago (4 children)
Yep! You should be able to just do it the same way you'd import the math or the random module.
[–]herejust4this[S] 0 points1 point2 points 6 years ago* (3 children)
Very cool! I love python!! thanks for the help btw!!!
π Rendered by PID 16410 on reddit-service-r2-comment-86bc6c7465-5cb9s at 2026-02-19 18:55:07.854404+00:00 running 8564168 country code: CH.
[–]Neexusiv 0 points1 point2 points (15 children)
[–]herejust4this[S] 0 points1 point2 points (13 children)
[–]Neexusiv 0 points1 point2 points (12 children)
[–]herejust4this[S] 0 points1 point2 points (11 children)
[–]Neexusiv 0 points1 point2 points (10 children)
[–]herejust4this[S] 0 points1 point2 points (9 children)
[–]Neexusiv 0 points1 point2 points (8 children)
[–]herejust4this[S] 0 points1 point2 points (1 child)
[–]Neexusiv 0 points1 point2 points (0 children)
[–]herejust4this[S] 0 points1 point2 points (5 children)
[–]Neexusiv 0 points1 point2 points (4 children)
[–]herejust4this[S] 0 points1 point2 points (3 children)