#1
|
|||
|
|||
trouble importing external modules (SCRT 9.0)
Hey all,
I've been using SecureCRT 9.0 and writing some pretty handy Python3 scripts for a few weeks now. The other day, I shared one of my scripts with a coworker, and they were unable to get it to work. - They're using SecureCRT 9.0 on Windows 10 - They have Python 3.8.6 installed. This is the version that runs when they enter 'python' at the Windows command line. - The package in question (PyQt) can be imported from the local Python shell. - They're using the same scripts I am (Python3 tag used at top) However, when they go to run the script in SecureCRT, they see a 'ModuleNotFound' error. Any information on troubleshooting something like this would be greatly appreciated. I'm just quite stumped why, if secureCRT is using the local python interpreter, it doesn't see that module. Thank you |
#2
|
|||
|
|||
Hi garrettwilliams,
Are you saying the same script works for you without issue? If so, do you know of any significant differences in your environment compared to the colleague's? Did your colleague follow the tips in this post?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hey Brenda,
Yes, that's correct. It works for me without issue. He also did follow the steps in that best practices post. I'm not aware of any difference in our environment that would cause this. Outside of the PATH and PYTHONPATH variables, I'm not really sure where else to look. |
#4
|
|||
|
|||
Hi garrettwilliams,
My manager has suggested each of you (in your own environment) run the same simple script: Code:
# $language = "Python3" # $interface = "1.0" import sys import platform strInfo = ( "{}\n\nsys.version: {}\n\nsys.hexversion: {}\n\nplatform.python_version: {}\n\nImplementation: {}\n\nCompiler: {}\n\nBuild: {}\n\nPath: {}".format( sys.version_info, sys.version, sys.hexversion, platform.python_version(), platform.python_implementation(), platform.python_compiler(), platform.python_build(), sys.path )) crt.Clipboard.Text = strInfo crt.Dialog.MessageBox(strInfo)
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Thanks for the response!
We actually got it sorted out. One of the modules I had built that we were importing was missing this: Code:
# $language = "python3" # $interface = "1.0" |
#6
|
|||
|
|||
Hi garrettwilliams,
Thanks for posting the resolution. I am glad to hear you got it working. ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|