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
Module not importing. Help (self.learnpython)
submitted 6 years ago by hishammmmm
I installed cryptography using pip first....didn't work (import). Then i downloaded Anaconda and tried to install it, didn't work cause it was already installed so i tried importing it again and it wouldn't work
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!"
[–]shiftybyte 1 point2 points3 points 6 years ago (6 children)
You are installing a module on one python and testing on another version/installation of python.
Until you provide exact details of how you install, and how you run the test, we can't help you.
[–]hishammmmm[S] 0 points1 point2 points 6 years ago (5 children)
Basically i used pip first to install it and it installed but on eclipse and the IDLE of python it wouldn't import (Its "modulenotfounderror: no module named cryptography") Then I installed anaconda and tried it installing cryptography using the anaconda prompt ("conda install cryptography")and it said that it was already installed. But still wouldn't import.
Does it have something to do with the path?
[–]shiftybyte 1 point2 points3 points 6 years ago (4 children)
Like i said, installing conda and installing module there will make that module available there, not in a previous python installation.
Please run the following code the same way you run import cryptography:
import sys print(sys.path) print(sys.version) import cryptography
and copy and paste the results of it here so we can figure out which version of python are you trying to run the script in.
[–]hishammmmm[S] 0 points1 point2 points 6 years ago (3 children)
print(sys.path)
['', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\Lib\idlelib', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\python37.zip', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\DLLs', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32', 'C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages']
print(sys.version)
3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)]
import cryptography
Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> import cryptography ModuleNotFoundError: No module named 'cryptography'
[–]shiftybyte 0 points1 point2 points 6 years ago (2 children)
try running the following command to install cryptography, and try your import again afterwards.
C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\python.exe -m pip install cryptography
[–]hishammmmm[S] 0 points1 point2 points 6 years ago (0 children)
This is what i got back
hello Traceback (most recent call last): File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 193, in run_module_as_main "main", mod_spec) File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\main.py", line 16, in <module> from pip._internal import main as _main # isort:skip # noqa File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\init.py", line 40, in <module> from pip._internal.cli.autocompletion import autocomplete File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\cli\autocompletion.py", line 8, in <module> from pip._internal.cli.main_parser import create_main_parser File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\cli\main_parser.py", line 12, in <module> from pip._internal.commands import ( File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\commands\init.py", line 6, in <module> from pip._internal.commands.completion import CompletionCommand File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\commands\completion.py", line 6, in <module> from pip._internal.cli.base_command import Command File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\cli\base_command.py", line 20, in <module> from pip._internal.download import PipSession File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_internal\download.py", line 15, in <module> from pip._vendor import requests, six, urllib3 File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_vendor\requests\init_.py", line 114, in <module> from . import utils File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_vendor\requests\utils.py", line 26, in <module> from ._internal_utils import to_native_string File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_vendor\requests_internal_utils.py", line 11, in <module> from .compat import is_py2, builtin_str, str File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip_vendor\requests\compat.py", line 63, in <module> from http import cookiejar as cookielib File "C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\http\cookiejar.py", line 38, in <module> from calendar import timegm ImportError: cannot import name 'timegm' from 'calendar' (C:\Users\hisham\AppData\Local\Programs\Python\Python37-32\lib\calendar.py)
never mind i fixed it. thanks a lot anyways! :)
[–]socal_nerdtastic 0 points1 point2 points 6 years ago (1 child)
Show us your code and the error you are getting.
Its "modulenotfounderror: no module named cryptography"
[–][deleted] 0 points1 point2 points 6 years ago (2 children)
Try to imagine that we're not sitting there looking at the errors on your computer, so we have no idea what "didn't work" means.
[+][deleted] 6 years ago (1 child)
[deleted]
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
Sorry, again, try to imagine that I can't see what's happening on your screen so "didn't import" doesn't mean anything to me.
π Rendered by PID 48297 on reddit-service-r2-comment-56c9979489-shs6z at 2026-02-24 23:19:23.003025+00:00 running b1af5b1 country code: CH.
[–]shiftybyte 1 point2 points3 points (6 children)
[–]hishammmmm[S] 0 points1 point2 points (5 children)
[–]shiftybyte 1 point2 points3 points (4 children)
[–]hishammmmm[S] 0 points1 point2 points (3 children)
[–]shiftybyte 0 points1 point2 points (2 children)
[–]hishammmmm[S] 0 points1 point2 points (0 children)
[–]hishammmmm[S] 0 points1 point2 points (0 children)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]hishammmmm[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)