[英]How can I send my Python Code (Which has pip modules) to a friend who doesn't have Python installed?
I wrote a Text Grammar Checker in Python for a friend of mine.我为我的一个朋友在 Python 中写了一个文本语法检查器。 Since he doesn't have Python installed, I searched for ways to get it to him, but there was always a catch.
由于他没有安装 Python,我想方设法将它交给他,但总是有一个问题。 Compiling it to a.exe file doesn't work because it uses a module called
pyspellchecker
which uses a deprecated module called indexer
(At least I think that's why it doesn't work).将其编译为 .exe 文件不起作用,因为它使用了一个名为
pyspellchecker
的模块,该模块使用了一个已弃用的名为indexer
的模块(至少我认为这就是它不起作用的原因)。 Another option would be to use an online IDE, but I could find none that could run my code using the modules it uses.另一种选择是使用在线 IDE,但我找不到可以使用它使用的模块运行我的代码的工具。 Is there any good option left for me or is this a lost cause?
有没有什么好的选择留给我,或者这是一个失败的原因? I'd really appreciate any help
我真的很感激任何帮助
Here's the source code if required: https://gist.github.com/AaryanGamer/093385d3df463282117edf2021b7cbc2如果需要,这是源代码: https://gist.github.com/AaryanGamer/093385d3df463282117edf2021b7cbc2
Documentation link https://www.pyinstaller.org/文档链接https://www.pyinstaller.org/
My first instinct would be to use a virtual environment ( venv
), and send your friend the whole folder structure.我的第一直觉是使用虚拟环境(
venv
),并将整个文件夹结构发送给您的朋友。 I searched for "venv portable", and the first result - https://aarongorka.com/blog/portable-virtualenv/ - may be what you're looking for if you're both in a Linux environment.我搜索了“venv 便携”,第一个结果 - https://aarongorka.com/blog/portable-virtualenv/ - 如果你们都在 Linux 环境中,可能就是您正在寻找的结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.