我一直在为PIP开发一个简单的GUI工具,并且有一个可以工作的原型。我正面临着为它创建设置的问题。该程序是为Debian用户设计的(目前),因此它希望在安装之后,来自终端的一个'pip-gui‘命令为用户启动它。
存储库与代码的链接是:https://github.com/ayushpriya10/PIP-GUI
我的设置尝试可以在:https://github.com/GDGVIT/pip-gui上找到
(我创建的设置起作用了,但当我对它做了一些改动后,它就不起作用了,因此我更喜欢创建一个新的,而不是编辑现有的。我想对我的个人存储库的新设置进行必要的更改,因此,如果我应该对存储库的结构进行任何更改,请让我知道。)
我目前拥有的代码是:
import os
import re
import codecs
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def find_version(*file_paths):
try:
f = codecs.open(os.path.join(here, *file_paths), "r", "latin1")
version_file = f.read()
f.close()
except:
raise RuntimeError("Unable to find version string.")
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
try:
f = codecs.open("README.rst", encoding="utf-8")
long_description = f.read()
f.close()
except:
long_description = ""
setup(
name="pip-gui",
version=find_version("pip_gui/mainGUI.py"),
description="",
url="https://github.com/GDGVIT/pip-gui",
author="GDGVIT",
packages=find_packages(include=[
"pip_gui",
"pip_gui.*"
]),
include_package_data=True,
# py_modules=["pip_gui.mainGUI"],
entry_points={
"console_scripts": [
"pip-gui=pip_gui.mainGUI:main"
]
},
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Environment :: X11 Applications :: Qt",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2 :: Only",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: Implementation :: CPython"
],
install_requires=[
"beautifulsoup4>=4.5, <4.5.4"
]
)通过'pip install pip-gui‘进行的安装运行时没有任何错误,但终端中的命令'pip-gui’显示错误'command not found‘。
我想做的一些更改是将作者更改为'Ayush Priya‘,并将URL指向我的个人存储库。
发布于 2017-05-09 01:27:14
如果软件包名称后附加了连字符(中间没有空格),则如果安装了已标识的软件包,则会将其删除。这只是控制台格式,因此请尝试从pip-gui中删除连字符(将其设置为pipgui)。
完成后,如果程序位于控制台所在的目录中,则只需键入包名即可。或者,使用目录的完整路径- ie / path / to /program或cd并运行./program_name
https://stackoverflow.com/questions/43851135
复制相似问题