将私有 pypi 存储库从 GItlab 添加到 Pycharm
我正在尝试将 PyCharm 连接到我们在本地服务器上的新 gitlab 存储库。我已经发布了一个库包,让我们调用 package-name ,
我可以
pip install package-name --extra-index-url http://token:token_key@<server>/api/v4/projects/<project_id>/packages/pypi/simple --trusted-host <server>
在激活了 venv 的情况下使用终端来使用它,并且安装不会出现问题。
但是,当我在 Pycharm>Settings>Project Interpreter> 中尝试相同的 URL 时,添加包>管理存储库> “URL HERE”
http://token:token_key@<server>/api/v4/projects/<project_id>/packages/pypi/simple
我收到错误(通常是 404 错误,似乎表明未找到该 url。) 为什么它以一种方式工作,而不是另一种?更重要的是,如何让它工作,这样我就不必每次想从存储库安装包时都输入那么长的 url?
如何在 pycharm 中安装 gitlab pypi 风格的包注册表(包存储库)?
最好是在“设置”>“声音包”列表中找到包名称。 Python 解释器> 添加包 (+),其中同时包含 pypi 和本地包。
I'm trying to connect PyCharm to a new gitlab repository we have on a local server. I have published a library package lets call package-name
I can use
pip install package-name --extra-index-url http://token:token_key@<server>/api/v4/projects/<project_id>/packages/pypi/simple --trusted-host <server>
using the terminal with my venv activated, and it will install without issue.
However, when I try that same URL inside of Pycharm>Settings>Project Interpreter> Add package > Manage Repositories > "URL HERE"
http://token:token_key@<server>/api/v4/projects/<project_id>/packages/pypi/simple
I get errors (usually a 404 error which seems to indicate the url isn't found.) Why does it work one way and not the other? And more importantly how do I get it to work so I don't have to type in that long url each time I want to install a package from the repository?
How do you install a gitlab pypi style package registry (repository for packages) in pycharm?
Preferrably, I would be to find the package name in the list of packages sound in Settings> Python Interpreter>Add package (+) that includes both pypi and local packages together.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 PyCharm 中的已知问题。
PyCharm 2022.1 中已实施修复(尚未发布,但可用于预览评估)。
This is a known issue in PyCharm.
A fix has been implemented in PyCharm 2022.1 (which has not yet been released, but is available for preview evaluation).