Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pipenv不';t安装GitHub包';s依赖关系_Python_Github_Package_Virtualenv_Pipenv - Fatal编程技术网

Python pipenv不';t安装GitHub包';s依赖关系

Python pipenv不';t安装GitHub包';s依赖关系,python,github,package,virtualenv,pipenv,Python,Github,Package,Virtualenv,Pipenv,我有一个python包上传到GitHub。此软件包使用Pipenv管理依赖项。另一方面,我有一个使用该库的python工具(并使用Pipenv管理自己的依赖项) 查看我的包的Pipfile,我们可以看到它有两个依赖项: [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] requests = "*" loggly-python-handler = "*" [dev-pack

我有一个python包上传到GitHub。此软件包使用Pipenv管理依赖项。另一方面,我有一个使用该库的python工具(并使用Pipenv管理自己的依赖项)

查看我的包的Pipfile,我们可以看到它有两个依赖项:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"
loggly-python-handler = "*"

[dev-packages]
pylint = "*"

[requires]
python_version = "3.7"
(tool-aqleTTYE) C:\Projects\tool>pipenv graph
<my_package>==0.0.3
pylint==2.0.1
  - astroid [required: >=2.0.1, installed: 2.0.1]
    - lazy-object-proxy [required: Any, installed: 1.3.1]
    - six [required: Any, installed: 1.11.0]
    - wrapt [required: Any, installed: 1.10.11]
  - colorama [required: Any, installed: 0.3.9]
  - isort [required: >=4.2.5, installed: 4.3.4]
  - mccabe [required: Any, installed: 0.6.1]
在我的python工具中,我使用以下方法安装了我的软件包:
pipenv安装-e git+https://github.com//.git#egg=

但是,在检查工具的pip图时,我的包似乎没有依赖项:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"
loggly-python-handler = "*"

[dev-packages]
pylint = "*"

[requires]
python_version = "3.7"
(tool-aqleTTYE) C:\Projects\tool>pipenv graph
<my_package>==0.0.3
pylint==2.0.1
  - astroid [required: >=2.0.1, installed: 2.0.1]
    - lazy-object-proxy [required: Any, installed: 1.3.1]
    - six [required: Any, installed: 1.11.0]
    - wrapt [required: Any, installed: 1.10.11]
  - colorama [required: Any, installed: 0.3.9]
  - isort [required: >=4.2.5, installed: 4.3.4]
  - mccabe [required: Any, installed: 0.6.1]
可以肯定的是:

(tool-aqleTTYE) C:\Projects\tool>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'requests'
(工具aqleTTYE)C:\Projects\tool>python
win32上的Python 3.7.0(v3.7.0:1bf9cc5093,2018年6月27日,04:59:51)[MSC v.1914 64位(AMD64)]
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>导入请求
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ModuleNotFoundError:没有名为“requests”的模块
这是一个bug还是我做错了什么?

试试:

pipenv lock --clear
这将清除锁定文件。 这对我有用

卸载并安装后:

pipenv uninstall --all
然后

我第一次创建的自定义包(.whl)没有在“setup.py”中定义依赖项(install_requires),我也遇到了同样的问题。 我将其上传到个人pypi存储库并安装了它。 在更正我的错误并使用要求更新它并重试安装后,依赖项不起作用

我发现锁文件并没有显示依赖项的变化,而是“pipenv图形”显示了它们

然后我找到了命令