setup.py

How to install Python module without setup.py?

橙三吉。 提交于 2019-11-27 22:47:52
I'm new to Python and am trying to install this module: http://www.catonmat.net/blog/python-library-for-google-search/ There is no setup.py in the directory, but there are these files: BeautifulSoup.py browser.pyc __init__.pyc sponsoredlinks.py BeautifulSoup.pyc googlesets.py search.py translate.py browser.py __init__.py search.pyc Can someone please tell me how to setup or use this module? Thanks! The simplest way to begin using that code on your system is: put the files into a directory on your machine, add that directory's path to your PYTHONPATH Step 2 can be accomplished from the Python

No module named setuptools

与世无争的帅哥 提交于 2019-11-27 14:28:16
问题 I want to install setup file of twilio. When I install it through given command it is given me an error: No module named setuptools. Could you please let me know what should I do? I am using python 2.7 Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Python27>python D:\test\twilio-twilio-python-26f6707\setup.py install Traceback (most recent call last): File "D:\test\twilio-twilio-python-26f6707\setup.py", line 2, in <module> from

Why does “python setup.py sdist” create unwanted “PROJECT-egg.info” in project root directory?

*爱你&永不变心* 提交于 2019-11-27 14:17:53
问题 When I run python setup.py sdist it creates an sdist in my ./dist directory. This includes a "PROJECT-egg.info" file in the zip inside my "dist" folder, which I don't use, but it doesn't hurt me, so I just ignore it. My question is why does it also create a "PROJECT-egg.info" folder in my project root directory? Can I make it stop creating this? If not, can I just delete it immediately after creating the sdist? I'm using the 'setup' function imported from setuptools. WindowsXP, Python2.7,

Using setuptools to create a cython package calling an external C library

梦想与她 提交于 2019-11-27 12:19:31
问题 I am trying to compile, install and run a package that we'll call myPackage . It contains a *.pyx file that calls the function fftw_set_timelimit() from library fftw . Currently, when I run a script clientScript.py that imports the package I obtain the following error message : Traceback (most recent call last): File "clientScript.py", line 5, in <module> import myPackage.myModule ImportError: /usr/local/lib/python2.7/dist-packages/myPackage/myModule.so: undefined symbol: fftw_set_timelimit

Install python packages to correct anaconda environment

旧街凉风 提交于 2019-11-27 11:08:24
问题 I've setup anaconda and created a python 3.3 environment. Now I wanted to install some package (dataset). The install instructions ask to clone the git repo and run python setup.py install but now the packages are not installed to the environments site-packages folder but to a different anaconda location. What are the normal steps to solve that problem? Newbie-compatible solutions are preferred. The OS is MacOSX, just is case, it is relevant. 回答1: It looks like conda automatically adds pip to

distutils: How to pass a user defined parameter to setup.py?

拥有回忆 提交于 2019-11-27 11:01:00
Please prompt me how to pass a user-defined parameter both from the command line and setup.cfg configuration file to distutils' setup.py script. I want to write a setup.py script, which accepts my package specific parameters. For example: python setup.py install -foo myfoo Thank you, Mher Cerin As Setuptools/Distuils are horribly documented, I had problems finding the answer to this myself. But eventually I stumbled across this example. Also, this similar question was helpful. Basically, a custom command with an option would look like: from distutils.core import setup, Command class

requirements.txt vs setup.py

…衆ロ難τιáo~ 提交于 2019-11-27 09:28:18
问题 I started working with Python. I've added requirements.txt and setup.py to my project. But, I am still confused about the purpose of both files. I have read that setup.py is designed for redistributable things and that requirements.txt is designed for non-redistributable things. But I am not certain this is accurate. How are those two files truly intended to be used? 回答1: requirements.txt This helps you to set up your development environment. Programs like pip can be used to install all

setup.py: run build_ext before anything else

时光怂恿深爱的人放手 提交于 2019-11-27 06:17:33
问题 I'm working with a setup.py that creates a whole bunch of SWIG interface files during the build_ext step. This needs to run first, because subsequent build steps need a full list of the python files to work properly (like copying the python files to the package directory, creating the egg, creating the sources list, etc.). This is what currently happens when you do setup.py install : running install running bdist_egg running egg_info running install_lib running build_py running build_ext The

Python Packaging: Data files are put properly in tar.gz file but are not installed to virtual environment

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 05:18:39
问题 I can't properly install the project package_fiddler to my virtual environment. I have figured out that MANIFEST.in is responsible for putting the non-.py files in Package_fiddler-0.0.0.tar.gz that is generated when executing python setup.py sdist . Then I did: (virt_envir)$ pip install dist/Package_fiddler-0.0.0.tar.gz But this did not install the data files nor the package to /home/username/.virtualenvs/virt_envir/local/lib/python2.7/site-packages . I have tried many configurations of the

Difference between 'python setup.py install' and 'pip install'

白昼怎懂夜的黑 提交于 2019-11-27 05:01:25
问题 I have an external package I want to install into my python virtualenv from a tar file. What is the best way to install the package? I've discovered 2 ways that can do it: Extract the tar file, then run python setup.py install inside of the extracted directory. pip install packagename.tar.gz from example # 7 in https://pip.pypa.io/en/stable/reference/pip_install/#examples Is if there is any difference doing them in these 2 ways. 回答1: On the surface, both do the same thing: doing either python