Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-11-2021, 12:39 PM
garrettwilliams garrettwilliams is offline
Registered User
 
Join Date: Dec 2020
Posts: 13
Virtual Environments?

Hello,

Is there a way to direct SecureCRT 9.0 to run Python3 scripts in a virtual environment?
Reply With Quote
  #2  
Old 03-11-2021, 02:34 PM
cboyack cboyack is offline
VanDyke Technical Support
 
Join Date: Apr 2020
Location: Albuquerque, NM
Posts: 129
Quote:
Originally Posted by garrettwilliams View Post
Is there a way to direct SecureCRT 9.0 to run Python3 scripts in a virtual environment?
If you're asking if Python 3 scripts can be used on SecureCRT software that's running on a Windows VM, the answer is most likely yes, as long as you're using SecureCRT version 9.0 and have followed the steps in this post to allow SecureCRT to use an external Python 3.8 environment.

If you're asking something else entirely, could you please clarify your request/issue for me?
__________________
Thanks,
--Cameron

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-12-2021, 08:15 AM
garrettwilliams garrettwilliams is offline
Registered User
 
Join Date: Dec 2020
Posts: 13
Hey Cameron,

Thanks for the quick reply! I was able to work this out on my own. Python virtual environments are a real handy way of managing different Python versions, along with external modules. Here's some good general literature for anyone interested:

https://realpython.com/python-virtua...ents-a-primer/

Additionally, here's how I was able to run SecureCRT in a venv:

- Create a new shortcut (on your desktop or wherever). Set the target as C:\Windows\System32\cmd.exe.
- Open Properties for that shortcut, and adjust the target as follows:
+ C:\Windows\System32\cmd.exe /c C:\virtualenvs\SheetEnv\Scripts\activate.bat & call "C:\Program Files\VanDyke Software\SecureCRT\SecureCRT.exe"
+ Note the path could differ slightly depending on the name of your virtual environment, where it's stored, and the location of SecureCRT.exe.
- This shortcut should now open SecureCRT within that virtual environment.

Last edited by cboyack; 03-12-2021 at 08:47 AM. Reason: Separate font for command :)
Reply With Quote
  #4  
Old 03-12-2021, 08:48 AM
cboyack cboyack is offline
VanDyke Technical Support
 
Join Date: Apr 2020
Location: Albuquerque, NM
Posts: 129
Quote:
Originally Posted by garrettwilliams View Post
I was able to work this out on my own.
Excellent! I'm glad that you were able to find a solution!

Also, thanks for sharing what worked for you!
__________________
Thanks,
--Cameron

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:30 AM.