1

I'm trying to install a python library from this software package called "Baseball on a stick" the instructions call to run installPythonLibs.py. The issue I'm having is that when I hit enter, I get a window that opens up, asking me to choose an application to open the file in. Now this software comes with an instructional video that shows when you run this command, it should install a bunch of modules, not open up a "open with" window. the command line that im entering this into looks like this: C:\Users\Desktop\BBOS\src>installPythonLibs.py

Also, for more clearity, you can find the free software I downloaded at this location: https://sourceforge.net/projects/baseballonastic/

This page also has an instructional video, which shows what the end result of what I'm trying to do. What is causing this to open this "open with" window instead of installing the library? What do I need to do to fix it?

Thanks in advance!

  • I downloaded the archive, but there are no batch files anywhere in there. There's an installPythonLibs.py, though. Did you mean that file? – SomethingDark Feb 14 '15 at 21:08
  • Sorry, yes. The video works off an older version of the software, so I downloaded that as well when I started having issues with the current one not working. when i run the` installPythonLibs.py` I get the issue above –  Feb 14 '15 at 21:11
  • @SomethingDark, I have updated the original post. Do you have any idea what the issue is? –  Feb 14 '15 at 21:15
  • You get the "Open With" window when the extension of the file you're trying to open isn't associated with any installed programs. Do you have Python installed? – SomethingDark Feb 14 '15 at 21:46
  • Yes I have it installed, I'll add Python.exe to the path and see if that fixes it –  Feb 14 '15 at 22:03

1 Answers1

0

When typing a filename directly, you're trying to open the file in windows. Because it doesn't have a default action for .py files, it asks you what you wish to open it with. Instead, put in python.exe .\installPythonLibs.py. This will evaluate as "Open python, and through python run the script installPythonLibs.py".

This is assuming, of course, that you've already installed python. If you haven't, see https://www.python.org/downloads/windows/

Note: to be able to run python or python.exe directly in console, it is assumed you've setup path correctly. If you haven't, see Adding Python Path on Windows 7

Community
  • 1
  • 1
Dellkan
  • 1,861
  • 11
  • 15
  • Excellent, I'm away from the computer right now, but when I get back I'll try this out and let you know! Thanks. –  Feb 14 '15 at 22:02
  • when I run `python.exe.\installPythonLibs.py` it says it cannot find the path specifications. So I went to the link you provided and read up on how to add Python to the path. I went into the Environment Variables and added to the path ;C:\python27. I then restarted windows and opened up the command line tried again, but it still cant find the path specification –  Feb 15 '15 at 00:05
  • Do you actually have python installed? It's not something that comes with windows. Visit the download link above if not. Also, for the path thing, `C:\python27` is the default, but may vary. Adjust to wherever you've installed python. Either way, the path bit is mostly for convenience. You could just as easily run `C:\\full\path\to\python\python.exe C:\\full\path\to\the\python\script.py`, but again, python must be installed on your system before you can use it, obviously. – Dellkan Feb 15 '15 at 00:31
  • I found the issue. I forgot when I installed Python, that I changed which directory it was saved to, hence why `C:\Python27` didnt work. Thanks for your help! –  Feb 15 '15 at 00:38