如何指定软件包的名称?
我已经通过PIP构建并安装了Python软件包,假设Tetris
。现在,在另一个分支上,我编写了代码,该代码在主分支中添加了一些新功能,让我们称之为分支tetris_3d
。 我想从tetris_3d
分支上构建和安装一个软件包,并给它一个名称tetris_3d
。我想要两个软件包Tetris
和tetris_3d
在我的计算机上共存。
我该怎么做?
我认为更改setup.py.py
文件中的名称将起作用。但是类似:
setup(
name="tetris_3D",
license="BSD",
...
...
似乎没有帮助。 WHL正在创建,已安装软件包,但我无法导入。我的anaconda3 \ lib \ site-packages
文件夹都具有tetris_3d.dist.info
和tetris
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论