如何指定软件包的名称?

发布于 2025-01-29 12:08:43 字数 672 浏览 4 评论 0原文

我已经通过PIP构建并安装了Python软件包,假设Tetris。现在,在另一个分支上,我编写了代码,该代码在主分支中添加了一些新功能,让我们称之为分支tetris_3d。 我想从tetris_3d分支上构建和安装一个软件包,并给它一个名称tetris_3d。我想要两个软件包Tetristetris_3d在我的计算机上共存。

我该怎么做?

我认为更改setup.py.py文件中的名称将起作用。但是类似:

setup(
    name="tetris_3D",
    license="BSD",
    ...
    ...

似乎没有帮助。 WHL正在创建,已安装软件包,但我无法导入。我的anaconda3 \ lib \ site-packages文件夹都具有tetris_3d.dist.infotetris folder 文件夹,但在我看来,3D代码已经在Tetris中覆盖了所有内容,而不是创建新的新鲜。 当我进行导入Tetris时,它是导入的3D代码。

I have built and installed via pip a python package, let's say tetris. Now, on a another branch I have written code that adds some new functionality to the master branch, lets call that branch tetris_3D.
I want to build and install on my local pc a package from the tetris_3D branch and give it a name tetris_3D. I would like both packages tetris and tetris_3D to co-exist on my machine.

How can I do that?

I thought that changing the name in the setup.py file would work. However something like:

setup(
    name="tetris_3D",
    license="BSD",
    ...
    ...

doesnt seem to help. The whl is getting created, the package is installed but I cannot import it. My Anaconda3\Lib\site-packages folder has both tetris_3D.dist.info and tetris folders but it looks to me that the 3D code has overwritten everything inside tetris instead of creating a new fresh one.
When I do import tetris then it is the 3D code that gets imported.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文