setuptools

Centos7下安装python3及pip3

偶尔善良 提交于 2019-12-03 04:52:36
Centos7下安装python3及pip3 先去python官网下载python3安装包 执行命令:wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz 安装zlib-devel包(后面安装pip需要用到,这里先下载,后面就不用重复编译) yum install zlib-devel 解压命令: tar -xvf Python-3.6.5.tgz 将解压文件移动到 usr/local目录下 执行命令:mv Python-3.6.5 cd /usr/local 在local目录下创建python3目录 mkdir /usr/local/python3 转到解压文件夹下 cd /usr/local/Python-3.6.5 配置安装目录 ./configure --prefix=/usr/local/python3 编译源码 make 执行源码安装 make install或者(make &&make install和上面两步是一个意思) 配置软连接 ln -s /usr/local/python3/bin/python3 /usr/bin/python3 转到根目录 cd / 输入 python3 看到提示信息表示安装成功 安装pip 安装依赖环境 # yum -y install zlib-devel

Depend on git repository in setup.py

心已入冬 提交于 2019-12-03 03:19:24
I'm trying to make a project depend on a git dependency. However, I can't seem to get it to work. What I basically want to achieve is the following, but it doesn't work: #!/usr/bin/env python3 from setuptools import setup setup( name='spam', version='0.0.0', install_requires=[ 'git+https://github.com/remcohaszing/pywakeonlan.git' ]) I tried several variations on the above, such as adding @master or #egg=wakeonlan-0.2.2 , but this doesn't make a difference. The following works, but only when using the deprecated pip flag, --process-dependency-links : #!/usr/bin/env python3 from setuptools

install pyopencv with pip on Mac OS X

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to install pyopencv with pip in OS X Mountain Lion and it fails by import setuptools. Following is my work. what is "Library" in setuptools? I have not seen that before. I already installed opencv via homebrew and other things. In doucmentation of pyopencv, it doesn't explain installation with pip only source install, (img2)appleparan@LiamMac src $ brew install cmake Warning: cmake-2.8.11.2 already installed (img2)appleparan@LiamMac src $ brew install cmake --upgrade Warning: cmake-2.8.11.2 already installed (img2)appleparan

Error while installing scrapy

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to install scrapy, it gives the following error: Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy) Running setup.py egg_info for package cryptography Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package

Python package structure, setup.py for running unit tests

前提是你 提交于 2019-12-03 02:58:55
问题 I'm not sure I'm organizing my package structure correctly or am using the right options in setup.py because I'm getting errors when I try to run unit tests. I have a structure like this: /project /bin /src /pkgname __init__.py module1.py module2.py /tests __init__.py test1.py test2.py My setup.py looks like this: #!/usr/bin/env python from setuptools import setup, find_packages setup(version='0.1', description='Trend following library', author='Nate Reed', author_email='nate@natereed.com',

pip: Any workaround to avoid --allow-external?

大兔子大兔子 提交于 2019-12-03 02:37:00
Recent versions of pip installer hasn’t installed packages that do not upload their package files to PyPI unless the user explicitly provide --allow-external option ( related answer ). I want to distribute my package that depend on such library like dirspec . Currently I have to tell users of my package to install my package by the following command: $ pip install --allow-external dirspec MyPackage It becomes more problematic when it comes to library packaging. If my package is a library I also have to tell authors of packages that depend on my package to tell their users to install their

Packaging legacy Fortran in Python. Is it OK to use setuptools and numpy.distutils?

匆匆过客 提交于 2019-12-03 02:34:36
问题 I am trying to make a python package distribution for some popular Fortran codes in my field. I want it to use the most standard approach with a setup.py file. The related qustion was helpful for learning how to wrap Fortran extensions. When using this approach, I noticed some confusing behavior when mixing setuptools and numpy.distutils . Is it bad practice to mix the two? As of 2015, it seems preferable to use setuptools as much as possible. However, I would like to build Fortran extensions

Setuptools “development” Requirements

扶醉桌前 提交于 2019-12-03 02:14:34
问题 TL;DR : Is there a way to hook setuptool's 'develop' to install a set of development requirements when running python setup.py develop ? I'm building my first python package using setuptools. I'm specifying the requirements as: requirements = [ 'click', 'ansible', 'fabric', 'gitpython', 'pyyaml', 'jinja2', 'yapsy' ] test_requirements = [ 'pytest', 'pytest-pep8', 'pytest-cov', ] setup( ... install_requires=requirements, tests_require=test_requirements, ... ) During development, I've been

What is causing ImportError: No module named pkg_resources after upgrade of Python on os X?

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I just updated Python to 2.6.4 on my Mac. I installed from the dmg package. The binary did not seem to correctly set my Python path, so I added '/usr/local/lib/python2.6/site-packages' in .bash_profile >>> pprint.pprint(sys.path) ['', '/Users/Bryan/work/django-trunk', '/usr/local/lib/python2.6/site-packages', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin', '/Library/Frameworks

How to solve pkg_resources.VersionConflict error during bin/python bootstrap.py -d

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am tring to create a new plone environment using python plone-devstart.py tool. I got a bootstrap error. So i used a command bin/python bootstrap.py -d from my project directory. It(bin/python bootstrap.py -d command) worked fine before But now i got an error like oomsys@oomsysmob - 6 :~ /demobrun$ bin/ python bootstrap . py - d Downloading http : //pypi.python.org/packages/source/d/distribute/distribute- 0.6 . 49.tar . gz Extracting in / tmp / tmpDqVwYA Now working in / tmp / tmpDqVwYA / distribute - 0.6 . 49 Building a