3

One solution I have been trying to convert python scripts into .exe files using things like py2exe and cx_Freeze, but I keep getting errors after running the cmd. Is there any other solutions you guys can think of, or should I just keep trying what I am currently working on.

Notes: I am running Spyder 3.3.1 on anaconda, and using the anaconda prompt to install files and use files I install

Example 1: I compile the program using

pyinstaller myscript.py

When it finishes running, I am left with a full build folder, but an empty dist folder.

The final Error I get before the cmd prompt stops is:

for real_module_name, six_module_name in real_to_six_module_name.items():
AttributeError: 'str' object has no attribute 'items'
adamcoolcat
  • 105
  • 7

2 Answers2

1

If all you're looking to do is run the script without using an IDE, just run it from the command line.

C:\Python27\python.exe C:\script\path\my_python_script.py

If you want a double clickable icon, you could wrap this in a batch file.

Software2
  • 2,358
  • 1
  • 18
  • 28
0

What I ended up using was an addon for python called xlwings. It was a simple install using,

conda install xlwings 

and I just used an excel spreadsheet for input (folder/sheet ids and titles).

I made a macro that allows me to push a single button that launches the code (without having to have a python interpreter open) and it works perfectly.

Thanks to everyone for their constant help and support, I greatly appreciate it!

adamcoolcat
  • 105
  • 7