setuptools

Pythonpath is still ignored and unable to install locally with pip

≯℡__Kan透↙ 提交于 2019-12-11 13:03:11
问题 I'm finding that my pythonpath environment variable is ignored. I'm using python 2.6 on ubuntu. I have in my .bashrc the following: export PTYHONPATH=/my/home/mylibs/lib/python2.6/site-packages/:$PYTHONPATH Then I install a new version of numpy using: python setup.py install --prefix=/my/home/mylibs/ and it gets correctly installed locally. However, when I try to install other packages (also using setup.py ) that depend on the new version of numpy, they cannot find it, because by default the

pkg_resources.DistributionNotFound when using a module installed from a bdist_rpm

天涯浪子 提交于 2019-12-11 10:26:05
问题 I am trying to create a rpm of a CLI tool I have built. The rpm is being created and is installing without errors. However, when I try to use the CLI I get the following exception: Traceback (most recent call last): File "/usr/local/bin/my_project", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 3141, in <module> @_call_aside File "/usr/lib/python2.7/site-packages/setuptools-20

When does setuptools install editable link to /…/my_module/build/lib/ andwhen does it link to /…/my_module?

家住魔仙堡 提交于 2019-12-11 07:04:10
问题 I noticed that when I do an editable install ( pip install --user -e . ), sometimes, setuptools make a build directory and egg-links to /.../my_module/build/lib . While sometimes (if I do it in another project), it does not create this directory and simply egg-links to /.../my_module However, I can't figure out why. In the first case, the project is not really editable (since it seems to build the package, and link to the build version) What does cause setup tools to use build/lib rather than

pip freeze captures the package name as if it was on python index site, but it is not. full path is needed

安稳与你 提交于 2019-12-11 06:58:25
问题 I installed a package from git hub: pip install -e git+http://github.com/un33k/django-uuslug.git#egg=django-uuslug Then I did: pip freeze > req.txt I get: django-uuslug==0.1 Now if I do a pip install -r req.txt , I get a package not found error, which due to the fact that django-uuslug is not on pypi. Why is freeze not remembering the full path as it was given during the install? 回答1: I had the same issue. I believe it's a problem whenever the packages are in a subdirectory(e.g. src). Here's

setuptools sdist ignore data_files

点点圈 提交于 2019-12-11 06:46:15
问题 According to docs https://packaging.python.org/en/latest/distributing/#data-files setuptools will honor data_files configed in setup.py. But i can't make it work. This is my setup.py: setup( name='booking_order', version=version, packages=find_packages(), package_data={ 'booking_order': ['fake_backends/static/*', 'scripts/*', '*.sample'], }, data_files=[ ('/etc/booking', ['etc/booking.conf']) ], This is the project's file tree: . ├── booking_order │ ├── __init__.py │ ├── tests │ │ ├── __init_

Using setuptools to install files to arbitrary locations

≡放荡痞女 提交于 2019-12-11 06:16:31
问题 Is there a way to install files to arbitrary locations with setuptools? I've used Data Files with setuptools before, but those are typically installed inside the package directory. I need to install a plugin file that will be located in the install directory of another application. 回答1: The data_files attribute will allow you to specify full paths. You could also do some shutil.copy magic in your setup.py, except don't. 回答2: It seems that setuptools has purposely made it difficult to install

top-level package handling with setuptools (or another python egg builder)

倾然丶 夕夏残阳落幕 提交于 2019-12-11 05:59:48
问题 I am writing a little python app. I want to be able to easily deploy the app. I know that python 2.6 will allow one to execute an egg directly if there is a main module at the egg's root. I actually have that working. The one kink is that when I try to use the argparse library, I cannot include the library in the egg without installing it into my source directory (or symlinking in the argparse.py into my source dir) since the argparse module is in the top-level package. If I install it into a

package only cythonized binary python files and resource data but ignoring python .py source files

江枫思渺然 提交于 2019-12-11 04:59:56
问题 I need to obfuscate my python code, to achieve it I am using cythonize extension, I am able to achieve it and get the binary compiled a.so files from a.py files but after doing bdist_wheel the .whl package only packages the a.so files and ignores the resource_folder. My project file structure is |main_project |__,setup.py |__,main_folder |____,a.py |____,__init__.py |____resource_folder |__,a.model |__,a.json I used following links to make obfuscated python wheel package, https://bucharjan.cz

Where and how, to find the installer file after creating and adding set up project to a solution having a windows application?

喜欢而已 提交于 2019-12-11 04:20:04
问题 HI, I have a windows application in C#. I created and added a set up project to this solution. Then, built the solution. I refered to this link http://www.codeproject.com/KB/install/SetupAndDeployment.aspx . I even added the shortcut of " Primary output of my application " to "User's Desktop" folder. But I am not able to find the installer file in Desktop, so that I can "double click" this installer file and install my Windows application. KINDLY HELP ME WITH THE PROCEDURE THAT NEEDS TO BE

'pip3 --version' failing with a SyntaxError

耗尽温柔 提交于 2019-12-11 04:08:51
问题 This all began when I set out to install the Requests library for Python 3 (I'm running on OSX Mavericks with Python 2.7.5 (installed by brew install python ) and 3.4.2 (installed by brew install python3 ). When I run pip3 --version (or anything related to the pip3 command) I see this: $ pip3 --version Traceback (most recent call last): File "/usr/local/bin/pip3", line 7, in <module> from pip import main File "/usr/local/lib/python3.4/site-packages/pip/__init__.py", line 11, in <module> from