我的工作目录树结构:
├── LICENSE
├── MANIFEST.in
├── README.md
├── setup.py
└── spotidnldr
├── MANIFEST.in
├── README.md
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-38.pyc
│ ├── converter.cpython-38.pyc
│ ├── cover_download.cpython-38.pyc
│ ├── downloader.cpython-38.pyc
│ ├── env_checker.cpython-38.pyc
│ ├── env_setup.cpython-38.pyc
│ ├── spot.cpython-38.pyc
│ ├── tag_embedder.cpython-38.pyc
│ └── youtube_search.cpython-38.pyc
├── clifi.py
├── converter.py
├── cover_download.py
├── downloader.py
├── env_checker.py
├── env_setup.py
├── requirements.txt
├── spot.py
├── tag_embedder.py
├── termux_setup.sh
├── web.py
└── youtube_search.py
现在,当我使用setup.py ie pip install .
安装时
程序已成功安装,但问题是当我运行setup.py中控制台脚本中指定的命令时,它会抛出ModuleNotFoundError。
我的setup.py看起来像这样
import setuptools
with open("README.md", 'r+') as f:
print("opened")
long_de = f.read()
setuptools.setup(
name="spotidnldr", # Replace with your own username
version="0.1b1",
author="Rohit Patil",
author_email="rahulhimesh09@gmail.com",
description="the spotify song downloader",
long_description = long_de,
long_description_content_type="text/markdown",
url="https://github.com/raprocks/spotindnldr",
packages=["spotidnldr",],
install_requires=[
"spotipy",
"youtube-dl",
"eyeD3",
"requests",
"click",
"ffmpeg-python",
],
classifiers=[
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
entry_points='''
[console_scripts]
spoti=spotidnldr.clifi:download
''',
python_requires='>=3.8',
include_package_data=True,
)
在终端中运行spoti后出错
$ spoti
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/spoti", line 5, in <module>
from spotidnldr.clifi import download
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/spotidnldr/clifi.py", line 2, in <module>
from env_setup import *
ModuleNotFoundError: No module named 'env_setup'
请帮我解决这个问题。如果有帮助,我将使用click python模块将我的应用程序转换为cli
您正在从名为
setup.py
的工作区之外的spotidnldr
调用方法。setup.py
将包含在根目录中。所以你必须使用希望这有帮助
相关问题 更多 >
编程相关推荐