setuptools

CentOS 7.2 安装 easy_setup 工具

和自甴很熟 提交于 2019-12-01 12:46:17
10 [root@localhost ~]# yum -y install wget 20 在官网找到链接地址: https://pypi.org/project/setuptools/#files 30 用wget下载 : https://files.pythonhosted.org/packages/c3/a8/a497f2f220fd51a714d0a466a32b8ec7d71dafbb053cb490a427b5fa2a1c/setuptools-40.4.1.zip 40 安装 zip, unzip #yum install zip unzip 50 解压: #yum install zip unzip 60 进入解压出来的目录: # cd setuptools-40.4.1 70 编译安装 python setup.py build python setup.py install 来源: CSDN 作者: zerologic2 链接: https://blog.csdn.net/zerologic2/article/details/82806184

How can I use jython setup.py install?

与世无争的帅哥 提交于 2019-12-01 12:40:32
I am using a Jython virtualenv where I can install whatever software via pip or via easy_install, but there is a software that is not registered yet and the installation mode via: [sudo] python setup.py install and I am trying to do the same with jython: [sudo] jython setup.py install So, I am getting these follow errors: Traceback (most recent call last): File "setup.py", line 3, in <module> from setuptools import setup, find_packages ImportError: No module named setuptools I checked and installed jython ez_setup.py again. I downloaded the yolk and didn't solved too. My folder: ╭─hudson

How to use setuptools packages and ext_modules with the same name?

青春壹個敷衍的年華 提交于 2019-12-01 12:32:15
I got the following file structure for my Python C Extension project: . ├── setup.py ├── source ├── cppimplementation │ └── fastfile.cpp └── fastfilepackage ├── __init__.py └── version.py And I use the following setup.py file: from setuptools import setup, Extension setup( name= 'fastfilepackage', version= '0.1.1', package_dir = { '': 'source', }, packages = [ 'fastfilepackage', ], ext_modules= [ Extension( 'fastfilepackage', [ 'source/cppimplementation/fastfile.cpp', ] ) ], ) I install them with: $ pip3 --version pip 19.1.1 (python 3.6) $ python3 --version Python 3.6.7 $ pip3 list Package

Linux Python详细安装、升级指南

痞子三分冷 提交于 2019-12-01 11:56:25
Linux机器一般自带Python都是较低版本,下面我们讨论一下升级Python【示例中使用的是阿里云的CentOS】 ####首先下载源tar包 可利用linux自带下载工具wget下载【如果没有wget可以直接下载该文件后上传到服务器或安装wget(见附录)支持】,如下所示: wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz ####下载完成后到下载目录下,解压 tar -zxvf Python-2.7.11.tgz ####进入解压缩后的文件夹 cd Python-2.7.11 ####在编译前先在/usr/local建一个文件夹python27(作为Python的安装路径,以免覆盖老的版本) mkdir /usr/local/python27 ####在解压缩后的目录下编译安装 ./configure --prefix=/usr/local/python27 make make install ####此时没有覆盖老版本,再将原来/usr/bin/python链接改为别的名字 mv /usr/bin/python /usr/bin/python_old ####再建立新版本python的链接 ln -s /usr/local/python27/bin/python2.7 /usr/bin

Force eclipse to reload Python modules

瘦欲@ 提交于 2019-12-01 11:52:19
I have started a Eclipse PyDev project, and found out that BeautifulSoup was missing. I installed it using easy_install , and now the scripts runs fine from the command line. Eclipse, however, still thinks that BeautifulSoup isn't installed, displaying an annoying error message and not supplying any introspection or auto complete. How can I force Eclipse to reload the system's python package list? You have to reconfigure the python interpreters. Normally the automatic configuration utility should discover everything by itself, but otherwise you can manually add/remove packages. Here's a

Pack setup files to single executable setup

隐身守侯 提交于 2019-12-01 10:57:18
问题 I have an old setup of the old program written on c++ which contains multiple installation files files. _SETUP.1 _SETUP.DLL _INST32I.EX_ _ISDEL.EXE SETUP.EXE DISK1.ID SETUP.INI SETUP.INS _SETUP.LIB SETUP.PKG I want to combine all that in to single executable file and i want to execute SETUP.EXE when user would run that single executable. Is it possible to achieve somehow? The easiest way is simple create archive and say to user to to unpack that and to run SETUP.EXE but i am just wondering

linux redhat 6 and installing easy_install

て烟熏妆下的殇ゞ 提交于 2019-12-01 10:12:48
问题 I'm completely new at this and needed a bit of help. I've got a hosted server running Linux Redhat 6 and using Python 2.7 (which has just been set as the default from Python 2.6) located at /usr/local/bin/python2.7 I'm trying to setup easy_install on the server, but I'm not sure if i'm doing it correctly, on the bash screen i'm running: sudo apt-get install python-setuptools But it keeps asking for a sudo password, which i'm assuming is my normal admin password that i've used to login via SSH

Force eclipse to reload Python modules

泪湿孤枕 提交于 2019-12-01 09:53:26
问题 I have started a Eclipse PyDev project, and found out that BeautifulSoup was missing. I installed it using easy_install , and now the scripts runs fine from the command line. Eclipse, however, still thinks that BeautifulSoup isn't installed, displaying an annoying error message and not supplying any introspection or auto complete. How can I force Eclipse to reload the system's python package list? 回答1: You have to reconfigure the python interpreters. Normally the automatic configuration

How to exclude a single file from package with setuptools and setup.py

自闭症网瘾萝莉.ら 提交于 2019-12-01 09:13:38
I am working on blowdrycss . The repository is here . I want the settings file for blowdrycss_settings.py to be excluded from the final package on pypi. The intention is to dynamically build a custom settings file that will be placed in the users virtualenv / project folder. In setup.py , I have the following: packages=find_packages(exclude=['blowdrycss_settings.py', ]), I also tried exclude_package_data : exclude_package_data={ '': ['blowdrycss_settings.py'], '': ['blowdrycss/blowdrycss_settings.py'], 'blowdrycss': ['blowdrycss_settings.py'], }, I then run python setup.py sdist bdist .

Having py2exe include my data files (like include_package_data)

点点圈 提交于 2019-12-01 09:06:45
I have a Python app which includes non-Python data files in some of its subpackages. I've been using the include_package_data option in my setup.py to include all these files automatically when making distributions. It works well. Now I'm starting to use py2exe. I expected it to see that I have include_package_data=True and to include all the files. But it doesn't. It puts only my Python files in the library.zip , so my app doesn't work. How do I make py2exe include my data files? I ended up solving it by giving py2exe the option skip_archive=True . This caused it to put the Python files not