likianta / pyportable-installer Goto Github PK
View Code? Open in Web Editor NEWBuild and distribute installation-free python programs by all-in-one configuration file.
License: MIT License
Build and distribute installation-free python programs by all-in-one configuration file.
License: MIT License
在终端执行 pip install pyportable-installer
产生如下报错:
ERROR: Could not find a version that satisfies the requirement pyportable-installer (from versions: none)
ERROR: No matching distribution found for pyportable-installer
测试清华源和官方源均有此问题
使用python3.8.10的venv虚拟环境,本身自带tkinter。环境复制,打包后运行却提醒ModuleNotFoundError: No module named 'tkinter'
当我在文件中导入requests 然后进行打包
打包完成后 运行出现ModuleNotFoundError: No module named 'requests'
当我注释掉改行后 打包后的程序又能正常运行
但是我的库里包含requests 要怎么解决这种问题呢
我使用无控制台模式("enable_console": false)打包后,将软件传到其他电脑,运行时仍会有控制台弹出。请问这是bug还是配置到其他电脑运行要重新打包?
一直在寻找pyinstall的替代品,pyinstall打包的opencv实在忍受不了。找到此项目,可惜我项目是2.7
通过查看 发现是 markup.py里出现错误
也就是这个文件的第36行 MarksMeaning = dict[MarkMeaning, t.Any] ?
通过我看了看 我觉得你这个是不在定义类型 MarksMeaning = Dict[MarkMeaning, t.Any] 它应该是这样的吧
我发现很多文件你定义类型用的都是小写的 我使用3.8 全部报错,是不支持3.8嘛?
环境 win7x64 python3.8.5
看着这个软件比pyinstaller好跟多,想试试效果呢结果没运行起来麻烦作者看下问题吧
PS D:\dec> python --version
Python 3.8.5
PS D:\dec> python -m pyportable_installer -h
�[14tTraceback (most recent call last):
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyportable_installer\__init__.py", line 1, in <module>
import lk_logger
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\lk_logger\__init__.py", line 4, in <module>
from .global_controls import disable
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\lk_logger\global_controls.py", line 4, in <module>
from .logger import lk
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\lk_logger\logger.py", line 10, in <module>
from .message_formatter import MessageFormatter
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\lk_logger\message_formatter.py", line 72, in <module>
class MessageFormatter:
File "C:\Users\123\AppData\Local\Programs\Python\Python38-32\lib\site-packages\lk_logger\message_formatter.py", line 75, in MessageFormatter
def markup(*markups: tuple[str, str]) -> str:
TypeError: 'type' object is not subscriptable
PS D:\dec>
from pyportable_installer import full_build
error:ImportError: cannot import name 'currdir' from 'lk_utils.filesniff
我尝试根据 https://github.com/likianta/pyportable-installer/blob/master/docs/pyproject-manual.md 里介绍的方式,创建一个 pyproject.toml 来使用,但是当我尝试使用 python -m pyportable_installer init --format=toml
命令创建的时候,却直接报错:
Error: No such option: --format
根据 python -m pyportable_installer init -h
查看帮助,好像现在 Init 已经没有了 --format
之类的参数了
那该怎么搞呢
你好,还在维护吗?
F:\WorkPlace\CTPWorkPlace\TqTest2022\env\lib\site-packages\embed_python_man │
│ ager\downloader.py:97 in download │
│ │
│ 94 │
│ 95 │
│ 96 def download(link, file, exist_ok=True): │
│ > 97 │ from lk_logger.general import std_print │
│ 98 │ │
│ 99 │ if exists(file): │
│ 100 │ │ if exist_ok:
ImportError: cannot import name 'std_print' from 'lk_logger.general'
(F:\WorkPlace\CTPWorkPlace\TqTest2022\env\lib\site-packages\lk_logger\general.p
y)
你好,我在尝试打包此项目的示例文件 hello_world ,启动后提示找不到模块。
Runtime Exception: Traceback (most recent call last):
File "...\hello_world_0.4.7\src\pylauncher.py", line 150, in
mod = import_module(conf['TARGET_MOD'], conf['TARGET_PKG'])
File "C:\Program Files\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "...\hello_world_0.4.7\src\hello_world\hello.py", line 1, in
from pyportable_runtime import inject
File "...\hello_world_0.4.7\lib\pyportable_runtime_init.py", line 1, in
from .inject import inject
ImportError: DLL load failed while importing inject: 找不到指定的模块。
....\Program Files\Python39\lib\site-packages\pyportable_installer\path_model.py:12 >> >>
[D2952] ASSETS_ENTRY = PACKAGE
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step1\main.py:20 >> main() >>
pyproj_dir = C:/Users/Administrator
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step1\init_key_params.py:68 >>
init_key_params() >> [I5239] is_full_python_required = False; is_embed_python_required = False; is_pip_required = False
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step2\prebuild_dist_dirs.py:48 >>
main() >> the suggest source root directory is: C:/Users/Administrator
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step2\dist_tree.py:74 >> build_dst_dirs() >>
[0] self.paths:
['C:/Users/Administrator/hello_world']
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step2\dist_tree.py:59 >> mkdir() >> [D0604] create empty folder; dir = C:/dist/hello_world_0.4.7/src/hello_world
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step3\step3_1\main.py:15 >> main()
>> model paths overview
[0] _:
('C:/Users/Administrator', 'C:/Users/Administrator/hello_world')
[1] _:
('C:/dist/hello_world_0.4.7',
'C:/dist/hello_world_0.4.7/src',
'C:/dist/hello_world_0.4.7/src/hello_world')
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step3\step3_1\exclusions.py:36 >>
_indexing_global_exlusion_list() >> attachments exclusions overview
[0] self.excluded_filenames:
('.git', '.gitignore', '.gitkeep')
[1] self.excluded_dirnames:
('pycache', '.git', '.idea', '.svn', '.vscode')
[2] self.excluded_paths:
set()
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step3\step3_2\compile_pyfiles.py:9
>> get_compiler() >> [I1028] compiler name; name = pyportable_crypto
....\Program Files\Python39\lib\site-packages\pyportable_installer\compilers\pyportable_encryptor.py:42 >>
init() >> [D2858] key = _trial
....\Program Files\Python39\lib\site-packages\pyportable_installer\compilers\pyportable_encryptor.py:45 >>
init() >> [I3130] note: the PyportableEncryptor is running under trial mode, the key
attribute is invalid.
....\Program Files\Python39\lib\site-packages\pyportable_installer\compilers\pyportable_encryptor.py:113 >>
load_encryption_func() >> [D3149] pyportable_crypto.version = 0.2.1-trial; pyportable_crypto.file = C:\Program Files/Python39/lib/site-packages/pyportable_installer/compilers/accessory/pyportable_crypto_trial_python39\pyportable_crypto_init.py
....\Program Files\Python39\lib\site-packages\pyportable_installer\compilers\pyportable_encryptor.py:155 >>
compile_all() >> [1/1] compiling; hello.py
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step3\step3_3\create_launcher.py:228
>> _run() >> converting bat to exe ... (it may take several seconds ~ one minute)
Creating EXE
Filename: ...\hello_world_0.4.7\Hello World.exe
Exe-Format: 64 Bit | Console (Visible)
Adding icon... OK
Adding resources... OK
Process finished
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step3\step3_3\create_launcher.py:231
>> _run() >> convertion bat-to-exe done
....\Program Files\Python39\lib\site-packages\pyportable_installer\main_flow\step1\main.py:20 >> main() >>
pyproj_dir = C:/Users/Administrator
....\Program Files\Python39\lib\site-packages\pyportable_installer\main.py:126 >> main() >> [I2501] See distributed project at:
"...:0" >> hello_world_0.4.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.