使用后
git install .
为什么会出现以下错误?
我的setup.py是这样的:
from setuptools import find_packages, setup
setup(
name='abc',
version='0.1.0',
description='abc',
url= '',
author="abc",
author_email="[email protected]",
include_package_data= False,
zip_safe= False,
packages=[
'wheel',
'pymysql',
'pandas',
'xlsxwriter',
'seaborn',
'matplotlib',
'scipy'
]
)
(venv) user@DESKTOP-6Z8XVW3:~/Projects/report$ pip install .
Processing /home/user/Projects/volatility_report
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-vc9xwr4x/Report.egg-info
writing /tmp/pip-pip-egg-info-vc9xwr4x/Report.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-vc9xwr4x/Report.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-vc9xwr4x/Report.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-vc9rwx4x/Report.egg-info/SOURCES.txt'
error: package directory 'wheel' does not exist
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
一些答案建议使用
python setup.py install
,但这返回:
(venv) user-6Z8XVW3:~/Projects/volatility_report$ python setup.py install
running install
/home/user/Projects/report/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/user/Projects/report/venv/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing Volatility_Report.egg-info/PKG-INFO
writing dependency_links to Report.egg-info/dependency_links.txt
writing top-level names to Report.egg-info/top_level.txt
error: package directory 'wheel' does not exist
目录结构为:
└── REPORT [WSL:UBUNTU]
├── package1
│ └── main.py
├── db
│ ├── __init__.py
│ └── mysql_client.py
└── setup.py