setuptools

What's the standard way to package a python project with dependencies?

风格不统一 提交于 2019-12-01 20:41:27
问题 I have a python project that has a few dependencies (defined under install_requires in setup.py). My ops people requires a package to be self contained and only depend on a python installation. The litmus test would be that they're able to get a zip-file and then unzip and run it without an internet connection. Is there an easy way to package an install including dependencies? It is acceptable if I have to build on the OS/architecture that it will eventually be run on. For what it's worth, I

pip install traceback error while installing packages in Python

不想你离开。 提交于 2019-12-01 20:05:20
I'm having issues to install python packages using 'pip', i have no problems until a couple of days ago, but now suddenly I have the error below every time i want to install something. I'm using Python 2.7 on windows, and I already reinstall 'pip' by still the same. Traceback (most recent call last): File "C:\Python27\Scripts\pip-script.py", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "build\bdist.win32\egg\pkg_resources.py", line 339, in load_entry_point ns.clear() File "build\bdist.win32\egg\pkg_resources.py", line 2470, in load_entry_point else: File

pip install traceback error while installing packages in Python

ⅰ亾dé卋堺 提交于 2019-12-01 18:53:24
问题 I'm having issues to install python packages using 'pip', i have no problems until a couple of days ago, but now suddenly I have the error below every time i want to install something. I'm using Python 2.7 on windows, and I already reinstall 'pip' by still the same. Traceback (most recent call last): File "C:\Python27\Scripts\pip-script.py", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "build\bdist.win32\egg\pkg_resources.py", line 339, in load_entry

Install package which has setup_requires from local source distributions

纵然是瞬间 提交于 2019-12-01 18:16:36
Take the following trivial package which contains setup_requires: from setuptools import setup setup(name='my_package', setup_requires=['cython']) Assuming I have done the following to build it to a source distribution: $ python setup.py sdist And downloaded the source distribution for Cython $ pip install --download ./dist/ --no-use-wheel Cython So now I have: $ ls dist/ my_package-0.0.0.tar.gz Cython-0.21.1.tar.gz What I'd like to be able to do is install the package on a network-isolated machine using some combination of --find-links , etc. I'd imagine I could do something like pip install

Install package which has setup_requires from local source distributions

淺唱寂寞╮ 提交于 2019-12-01 17:48:13
问题 Take the following trivial package which contains setup_requires: from setuptools import setup setup(name='my_package', setup_requires=['cython']) Assuming I have done the following to build it to a source distribution: $ python setup.py sdist And downloaded the source distribution for Cython $ pip install --download ./dist/ --no-use-wheel Cython So now I have: $ ls dist/ my_package-0.0.0.tar.gz Cython-0.21.1.tar.gz What I'd like to be able to do is install the package on a network-isolated

Inno Setup Constant in Code Section

佐手、 提交于 2019-12-01 17:07:00
Is there a way to get InnoSetup constant value in [Code] section? I need this during install time and the constant value that I am trying to get is {app} . You can use AppValue := ExpandConstant('{app}'); Documentation on ExpandConstant Example of it's usage . 来源: https://stackoverflow.com/questions/6931945/inno-setup-constant-in-code-section

python 安装setuptools、pip《转》

霸气de小男生 提交于 2019-12-01 16:15:06
https://www.jianshu.com/p/e9ab614cad9b 安装setuptools 下载setuptools源码setuptools-25.2.0.tar.gz 地址: https://pypi.python.org/pypi/setuptools 选择需要的版本 这是一个压缩文件,将其解压到桌面,并进入该文件夹 按住shift键后,在文件夹空白处点击鼠标右键,选择:在此处打开命令窗 重点:按住shift键 输入python setup.py install 回车 输入命令 python setup.py install 安装成功后新开一个命令窗,输入easy_install 回车,进行检测 如果提示: error: No urls, filenames, or requirements specified (see –help) 说明安装成功,它在提示你命令后面需要跟参数。 如果提示: ‘easy_install’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。 请检查环境变量path是否配置了“C:\Python27\Scripts” 安装pip 如果setuptools安装好后,可以直接用easy_install来安装pip 命令直接安装 如果还想手动安装的话,和安装setuptools步骤完全一样(这里就不附截图了) 地址: https:/

Setting package_dir to ..?

爱⌒轻易说出口 提交于 2019-12-01 15:08:14
问题 I have a Git repository cloned into myproject , with an __init__.py at the root of the repository, making the whole thing an importable Python package. I'm trying to write a setuptools setup.py for the package, which will also sit in the root of the repository, next to the __init__.py file. I want setup.py to install the directory it resides in as a package. It's fine if setup.py itself comes along as part of the installation, but it would be better if it didn't. Ideally this should work also

Installing Django and related packages on an offline computer

北战南征 提交于 2019-12-01 14:45:28
I'm using win7, python 2.7 and I have a project with several packages running. I wanted to move the project to my friends laptop (which can't access to internet, not an option). so I downloaded Python/Django/All required packages, Installed python and run python setup.py install in each package directory. I've found that some packages, even after I download them, requires somethings from the internet to be downloaded and causes error. so: How can I download a package and all it's dependencies or what ever it needs to be installed offline? This is how you can do it Install Django and all

Installing Django and related packages on an offline computer

天涯浪子 提交于 2019-12-01 13:47:44
问题 I'm using win7, python 2.7 and I have a project with several packages running. I wanted to move the project to my friends laptop (which can't access to internet, not an option). so I downloaded Python/Django/All required packages, Installed python and run python setup.py install in each package directory. I've found that some packages, even after I download them, requires somethings from the internet to be downloaded and causes error. so: How can I download a package and all it's dependencies