how to run cpython and pyaedt from electronics desktop

Options
byang
byang Member, Employee Posts: 2
Ansys Employee Photogenic

I would like to run a cpyton script from aedt


Tagged:

Best Answer

  • Samuel Lopez
    Samuel Lopez Member, Employee Posts: 21
    First Anniversary Ansys Employee 5 Likes First Answer
    Answer ✓
    Options

    Hi @byang ,

    You can run a CPython terminal from AEDT following the steps:

    1. Create a virtual environment with PyAEDT installed (pip install pyaedt). If you are using the batch file from the PyAEDT documentation, the virtual environment will be at "C:\Users\slopez\AppData\Roaming\pyaedt_env_ide"
    2. Open AEDT, and select Tools>External Tools.
    3. Create new content (Add). I called the menu "CPython CL" and the command is: cmd /k C:\Users\slopez\AppData\Roaming\pyaedt_env_ide\Scripts\activate.bat

    Finally, in Tools you will see the new button, which will open a CPython terminal with the specific virtual environment:


Answers

  • James Derrick
    James Derrick Administrator, Employee Posts: 255
    First Anniversary Solution Developer Community of Practice Member Ansys Employee 5 Up Votes
    admin
    Options

    Hi @byang ! Welcome to the forum! Unfortunately we've had to sink your question because it needs details and clarity before it can be answered meaningfully. Once you've added this information, we'll be happy to release it again :) .

    If you're not sure what sort of information to include, have a read of these discussions first.

    Starting discussions — Ansys Developer

    Forum Tips & Tricks — Ansys Developer

    You should also make sure to search the forum first, in case your question has already been answered somewhere.

    How do I filter by tag in the search? — Ansys Developer

    You may also like to create a MCVE "minimum, complete and verifiable example" of what you've already tried. This can be very helpful for users when answering questions.

    Otherwise welcome to the forum and happy posting!

    -James