Ask Your Question
0

Is it possible to add python packages to pss/e

asked 2019-07-29 09:01:22 -0500

NilleDaWize gravatar image

Hi,

I am trying to run a python program from PSS/E. The program I want to run uses MatPlotLib and other packages which are not installed in the version of python that PSS/E is running on. Is it possible to either specify the runtime enviroment alternatively add packages (ex, pip install matplotlib) to the python version that is currently being used?

Thanks, Niklas

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-07-29 11:26:24 -0500

drsgao gravatar image

Short answer, yes you can, Python is designed like that. Use anacoda 3 probably is the best and easiest way. Especailly if you need Python 2 and 3 on the same computer.

The first thing is that do you have to run it in PSSE though? Always remember that Python is an indepedent and general purpose programming language. Unless you need things from the PSSE GUI, like minipulating SLDs or plotting dynamic curve using the GUI functions, you may be better off to run your Python program independengly from the system shell. Remember, you can always use PSSE as a solver.

Ok, now your question. The easily way, you should have a "Prerequisites" folder in your PTI folder. It should have numpy, matplotlib and wxpython installers in there. Install them and you will have matplotlib.

Now, about environments and versions. Yes, you can have different Python environments and versions on one single computer. The easiest thing is to install a Python distribution that has those management built into it, like anacoda 3, which is a popular Python distribution for scientific computing. It is very easy to change Python environment with it and there are tutorials on its website. That's how I manage my Py2 and Py3 environments. Anaconda 3 comes with a ton of packages and you probably do not any more.

Remember, if you work for a corporate, chances are, you do not have admin right and other higher privilages. To pip packages from remote, your corporate network probably won't let you. But, try download the wheels from pipy.org and then install the packages. If you have not got pip already, you still can intall it locally with a wheel. Some packages will have quite a bit dependency, e.g., matplotlib, but as long as you are patient, you can download all needed packages, install them one-by-one, and finally install your target package.

Lastly, this kind of question is really better suited for webs like stackoverflow.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2019-07-29 09:01:22 -0500

Seen: 580 times

Last updated: Jul 29 '19