setuptools

python is not installing dependencies listed in install_requires of setuptools

我怕爱的太早我们不能终老 提交于 2019-12-21 07:28:20
问题 I have written a python module that depends on openpyxl. I want openpxyl to be installed as a dependency automatically using setuptools. I read that the proper way to do this is to include the following in the setup.py script: setup(name='methpipe', version=find_version("lala", "__init__.py"), description='Utilities', author='Jonathan T', author_email='jt@lala.com', url='https://git.com...', packages=find_packages(), install_requires=[ 'openpxyl = 2.3.3', ], scripts=["bin/submit_run_full.py"]

What is the alternative to using --process-dependency-links with pip

不羁的心 提交于 2019-12-21 07:21:11
问题 I am using Python 2.7. I am trying to pip install a repo (on internal github) that has a dependency on another repo (also on internal github). I tried several options but the one that worked was like this: (env)abc$ cat requirements.txt -e git://github.abc.com/abc/abc.git#egg=my_abc --process-dependency-links (env)abc$ pip install -r requirements.txt But I got a warning while running the command line that said: "DEPRECATION: Dependency Links processing has been deprecated and will be removed

setuptools: adding additional files outside package

前提是你 提交于 2019-12-21 06:58:57
问题 I have a python application that has a fixed layout which I cannot change. I would like to wrap it up using setuptools, e.g. write a setup.py script. Using the official documentation, I was able to write a first template. However, the application in question uses a lot of additional data files that are not explicitly part of any package. Here's an example source tree: somepackage __init__.py something.py data.txt additionalstuff moredata.txt INFO.txt Here's the trouble: The code in something

transport_encoding error during installing with pip

时光怂恿深爱的人放手 提交于 2019-12-21 05:36:14
问题 I'm getting unexpected arg: keyword encoding in parse() while trying to install any python package through pip. I'm getting this problem since i installed tensorflow for python 3.6, which probably led to some issue with html5lib and setuptools. Have reinstalled html5lib1.0b10 using tar.gz file (admin install) but the issue still remains. Please help!! pip install spacy Collecting spacy Exception: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\pip

setup.py: require a recent version of setuptools before trying to install

爱⌒轻易说出口 提交于 2019-12-21 05:31:20
问题 I'm creating a package that has 'typing;python_version<"3.5"' in it's install_requires . Apparently, this kind of dependency specification has only been implemented in recent versions of setuptools . If the setuptools on the user's machine is old they'll get: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in typing;python_version<"3.5" at ;python_version<"3.5" The easy solution is to tell the users to pip

Babel: compile translation files when calling setup.py install

☆樱花仙子☆ 提交于 2019-12-21 04:59:10
问题 I'm developing a Flask application using Babel. Thanks to Distutils/Setuptools Integration, all the parameters of compile/extract/... functions are stored in setup.cfg and compiling the i18n files is as easy as ./setup.py compile_catalog Great. Now I would like this to be done automatically when running ./setup.py install In make 's words, that would be letting install target depend on compile_catalog target. The context We store only translation ( .po ) files in the code repository.

Why is dependency links in setup.py deprecated?

↘锁芯ラ 提交于 2019-12-21 04:35:15
问题 There are quite a few people wondering for an alternative to dependency links in the setup.py (activated with the pip flag --process-dependency-links ): What is the alternative to using --process-dependency-links with pip, Depend on git repository in setup.py. Basically, I got bitten by the deprecation warning: "DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release." Some people have suggested using requirements.txt , however that is not an

centos5.x升级至python2.7、mysql-python

落花浮王杯 提交于 2019-12-21 04:25:37
centos5.3的python版本真让人泪奔,什么时代了还2.4的。自己动手丰衣足食。 1.从官网下载2.7版本 # wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tar.bz2 2.安装 # tar -jxvf Python-2.7.1.tar.bz2 # cd Python-2.7.1 # ./configure (如不指定 --prefix,默认安装在/usr/local/lib/python2.7) # make && make install 3.升级默认版本 # mv python /usr/bin/python24 # ln -s /usr/local/bin/python2.7 /usr/bin/python 4.安装mysql-python (安装方法不了解可以参看包内的README) # python setup.py build Traceback (most recent call last): File "setup.py", line 5, in < module > from setuptools import setup, Extension ImportError: No module named setuptools 什么情况?貌似setuptools没有 5

Is `setup.cfg` deprecated?

别说谁变了你拦得住时间么 提交于 2019-12-21 04:04:48
问题 It's not completely clear to me, what is the status of setup.cfg . I am looking for solutions for my other question about PEP 508 environment markers, and I became totally confused. To me it seems that setup.cfg is an improvement over setup.py , because it's declarative, does not involve running arbitrary code to make package installable, makes it harder to distribute malicious Python packages, makes it easier to run Python package registries etc. So, here in setuptools docs it's mentioned

How do I create Python eggs from distutils source packages?

最后都变了- 提交于 2019-12-21 03:51:10
问题 I vaguely remember some sort of setuptools wrapper that would generate .egg files from distutils source. Can someone jog my memory? 回答1: setuptools monkey-patches some parts of distutils when it is imported. When you use easy_install to get a distutils-based project from PyPI, it will create an egg (pip may do that too). To do the same thing locally (i.e. in a directory that’s a code checkout or an unpacked tarball), use this trick: python -c "import setuptools; execfile('setup.py')" bdist