setuptools

Error installing a python module

六眼飞鱼酱① 提交于 2019-12-08 15:07:44
问题 I am trying to install a python module with the standard python setup.py install but I get the following error. I am fairly new to python but I have been able to install other modules in this way in the past. I am under the impression this module setuptools is not something I am supposed to have gotten separate from my python installation. Do I need to be in a specific directory or something? Error: Traceback (most recent call last): File "setup.py", line 3 in <module> from setuptools import

setuptools: remove lib/python3.5/site-packages prefix from zip

痞子三分冷 提交于 2019-12-08 12:59:36
问题 I'm trying to create a package that should be distributed as a zip file, containing only the package itself. Unfortunately, at least when run from a virtualenv, the zip contains lengthy subdirectories. This is the file structure of the project: . ├── my_package │ └── __init__.py ├── README.md └── setup.py setup.py contains: from setuptools import setup, find_packages setup( name='my_package', version='1.0.0', author='my name', author_email='my-email@example.com', packages=find_packages('.'),

Migration from distribute to setuptools

对着背影说爱祢 提交于 2019-12-08 10:08:55
问题 I'm trying to convert a project that I had installing fine with distribute over to a newer setuptools based installer. For some reason I can't get setuptools to run at all. When I run my setup.py I get errors from distutils about unsupported options which are all the extension options provided by setuptools. I can't figure out why setuptools isn't taking care of these correctly. This is on a Debian Wheezy system running Python 2.7. I created a simple test case to demonstrate the problem. It

python setuptool how can I add dependency for libxml2-dev and libxslt1-dev?

与世无争的帅哥 提交于 2019-12-08 07:30:53
问题 My application needs lxml >= 2.1, but to install lxml its requied to install libxml2-dev libxslt1-dev else it raises error while installing the lxml, is there a way that using python setup tool I can give this as dependency in my setup.py.... 回答1: Not really ... setuptools only handle dependencies on package wich belongs already to pypi. So if you want these kind of dependencies, i think that you have to select the packaging technology brought by your favorite distribution. But, you can

Unable to install python-setuptools: ./configure: No such file or directory

丶灬走出姿态 提交于 2019-12-08 02:27:30
问题 The question is related to the answer to "Unable to install Python without sudo access". I need to install python-setuptools to install python modules. I have extracted the installation package. I get the following error when configuring [~/wepapps/pythonModules/setuptools-0.6c9]# ./configure --prefix=/home/masi/.local -bash: ./configure: No such file or directory I did not find the solution at the program's homepage. How can I resolve this error? 回答1: As Noah states, setuptools isn't an

Installing dependencies only - setuptools

若如初见. 提交于 2019-12-08 02:03:32
问题 I have a Python script, with several external dependencies, that I wish to distribute to colleagues. However, we will need to modify this script regularly so I don't want to install it per-se (i.e. copy to site-packages ). From what I've seen setuptools seems to do this implicitly. Is there a recommended approach to installing dependencies without installing the application/script itself? 回答1: You probably want to make sure that you and your colleagues use the same dependencies during

Running sonar-scanner from setup.py

≡放荡痞女 提交于 2019-12-07 18:44:08
问题 I am using sonarqube/soanrpython on windows to analyse my python code and would like to be able to initiate the scan using setuptools instead of calling the scanner from the DOS prompt. Is this possible?. I have searched the web and cannot find anything. I call the scanner using the following command C:> sonar-scanner -Dsonar.projectKey=TL:python -Dsonar.sources=mypackage But would like to be able to call C:> python setup.py sonar Or something similar Edit: To get this to work I put the

File not accessible error (setuptools) in logs

拟墨画扇 提交于 2019-12-07 13:54:51
问题 When I run my app, my app engine logs give me this error: WARNING 2012-03-01 23:27:31,089 py_zipimport.py:139] Can't open zipfile/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/setuptools-0.6c11-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Frameworks/Python.framework/ Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg' What does this mean? 回答1: The answer you have marked as accepted isn't helpful. An annoying bug in the App

Setuptools entry_points/console_scripts have specific Python version in shebang

我的梦境 提交于 2019-12-07 11:43:53
问题 I am generating a Python package on RHEL6 (with Python2.6), and trying to deploy it to a RHEL7 server (Python2.7). The package includes scripts generated with entry_points/console_scripts. However, the generated scripts have the specific python2.6 version in the shebang, as in: #!/usr/bin/env python2.6 How can I override or disable this so it just generates: #!/usr/bin/env python 回答1: entry_points = { 'console_scripts':[ ... ] }, options = { 'build_scripts': { 'executable': '/usr/bin/env

How to instrument setup.py to use wheel packages

孤者浪人 提交于 2019-12-07 10:18:42
问题 In my setup.py I have a dependency for numpy (in install_requires ). Is it possible to instrument the setup function to use wheel packages rather then source ones and not compile the whole numpy? Note: When I do pip install numpy it downloads the binary package of numpy. However python setup.py install gets the source package. 回答1: The wheel package was introduced with the purpose of fixing the problems with source distributions that were used by setuptools . Although setuptools had their own