python可执行程序在windows下could not be extracted_WinPython无法直接运行.py文件(没有spyder)...

I want to distribute my python project to others so that they can run it without installing python 3.4 on their PCs (windows)

I have downloaded and extracted both the WinPython-32bit-3.4.4.6Qt5 and WinPython-64bit-3.4.4.6Qt5 packages - and with the help of Spyder - I ran my python scripts without any problem (on 2 different machines with 32 and 64 bit windows). (I copied my python scripts into the settings/.spyder-py3 folder - and opened an run it from spyder). This worked OK even on machines where python is not installed.

However, when I double click on the python script (with a .py extension) - I see that it does not start running automatically. Windows is asking me to select the program that shall run/open the file. This is happening both on win7 and win8.

This seems strange - because last night it worked OK on the machine with a different version of winPython (py version 3.5). Today even that version is not working.

Cannot find any advice or suggestions regarding this on WinPython documentation or in any other place on the net.

What am I doing wrong? Aren't the .py scripts supposed to run without Spyder being invoked first?

Any help shall be greatly appreciated.

解决方案

OK. If anyone is interested about how I solved this topic:

I had to perform winPython's 'Register Distribution' process on the client machine to achieve what I wanted. It can be accessed from the advanced menu option from the WinPython Control Panel that is distributed with the WinPython package.

(This somewhat 'registers' the distributed python exe to the clients computer - which enables all .py files in that computer to be interpreted by this new python exe delivered with the winPython package.)

I had to tell my client to perform this action before he could run the py files with a double click.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值