使用setup.py

时间:2019-11-25 11:57:33

标签: python pip

我正在尝试使用my-module.my-function

导入python软件包

我发现您无需修改​​sys.path就可以做到这一点,因为这将要求我每次导入sys.path append时都调用my-module逻辑

Sibling package imports

问题是,当我在git控制的存储库下时,pip install -e .导致-e git+git@git-host:git-repo.git@checksum#egg=my-module&subdirectory=path/to/my-module

如果我尝试通过上述行(通过冻结的requirements.txt)来点行安装my-module,它将无法安装

  

错误:命令错误,退出状态为128:git clone -q   git @ {our-git-repo}:our-project.git@0b886902a04891546f39e20293359f994107b631   / home / eugenekim / virtualenvs / retention / src / retention检查日志中的   完整的命令输出。

完整输出

  

从   git + git @ our-git-repo:zibann.git@0b886902a04891546f39e20293359f994107b631#egg=retention&subdirectory=apps/retention   (摘自-r requirements.txt(第104行))   git @ our-git-repo:zibann.git@0b886902a04891546f39e20293359f994107b631   到/ home / eugenekim / virtualenvs / retention / src / retention运行   命令git clone -q   git @ our-git-repo:zibann.git@0b886902a04891546f39e20293359f994107b631   / home / eugenekim / virtualenvs / retention / src / retention致命:   不会出现'zibann.git@0b886902a04891546f39e20293359f994107b631'   成为致命的git存储库:리모트읽을      

올바른이권한지,그리고가있는지확인하십시오。清理中...移除构建   跟踪器'/ tmp / pip-req-tracker-xjou49h_'错误:命令错误   退出状态为128:git clone -q   git @ our-git-repo:zibann.git@0b886902a04891546f39e20293359f994107b631   / home / eugenekim / virtualenvs / retention / src / retention检查日志   for \完整命令输出。异常信息:追溯(大多数   最近通话结束):文件   “ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/cli/base_command.py”,   _main中的第153行       status = self.run(options,args)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/commands/install.py”,   382行,正在运行       resolver.resolve(requirement_set)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”,   第201行,已解决       self._resolve_one(requirement_set,req)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”,   _resolve_one中的第365行       abstract_dist = self._get_abstract_dist_for(req_to_install)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py”,   第295行,在_get_abstract_dist_for中       req,self.require_hashhes,self.use_user_site,self.finder,文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”,   第255行,在prepare_editable_requirement中       req.update_editable(不是self._download_should_save)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/req/req_install.py”,   第725行,在update_editable中       vcs_backend.obtain(self.source_dir,url = hidden_​​url)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/vcs/versioncontrol.py”,   在第494行中       self.fetch_new(dest,url,rev_options)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/vcs/git.py”,   fetch_new中的第208行       self.run_command(make_command('clone','-q',url,dest))文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/vcs/versioncontrol.py ”,   第632行,在run_command中       log_failed_cmd = log_failed_cmd)文件“ /home/eugenekim/virtualenvs/retention/lib/python3.6/site-packages/pip/_internal/utils/subprocess.py”,   第242行,在call_subprocess中       引发InstallationError(exc_msg)pip._internal.exceptions.InstallationError:命令错误   退出状态128:git clone -q   git @ our-git-repo:zibann.git@0b886902a04891546f39e20293359f994107b631   / home / eugenekim / virtualenvs / reten \ tion / src / retention检查日志   以获得完整的命令输出。

0 个答案:

没有答案