I have the following in my setup.cfg file: Problem is that I created an enviroment with Python 3.7 and installation had no problems. Installation command: Shouldn’t pip require a Python 3.8 enviroment? Here is the test.PyPI link: PyPI project, and here the repo: GitHub repo I know that the setup.cfg file is working because pip install packages in install_requires field
Tag: setuptools
Numpy install requirement on package fails on pip install from PyPI but not from .whl
I recently build my first python package and tried to test distribution with test.pypi.org (Github repo Test PyPI) Code for building the dist: Code for uploading to Test PyPI: Then I created and empty conda env to test the installation with: In this enviroment I used succesfully pip install with wheel file: But if I try to install it from
How can I setup a python CLI application so that I can use it without directly referring to the interpreter?
I want to build an application, say it’s called helloworld, with a command line interface in python. My application as multiple nested modules and a top level module main.py. Say the layout is : At this point, once my project is installed I can run it using #> python path/to/helloworld/main.py arg1 arg2 arg3 I want to be able to interact
Mix cython and cmake extensions in python setuptools
I have a python package with the following setup.py: I would like to know if I can call python setup.py build_ext –inplace and build each extension with the appropriate builder. I am aware of the cmdclass setup function argument but did not find a way to specify that build_ext should be used for the cython extensions and CMakeBuild for the
Python3: install github-based module in setup.py?
Installing with pip, I can write the following requirements.txt file: And successfully install the requirements file: However, I have co-located in the directory a setup.py script that lists: And installing this submodule using pip involves pip running setup.py…which fails to handle the module link: I can see a lot of ways around this, but it seems like there should be
“SyntaxError: invalid syntax” while installing Setuptools
I needed to install Setuptools for a project I was doing, and I had to download Setuptools through a .tar file (don’t ask), but when ran the command I needed to use to install it: It ended up with a SyntaxError: I’m using Python 2.7. Why is it showing the error, and how can I fix it? Edit: When I
xattr: ImportError: No module named pkg_resources
I was trying to run xattr on macOS Catalina 10.15.2 and the error occurred: So I tried the solution given by @cwc and installed the latest version of setuptools I also installed setuptools using pip3 Besides, I tried the methods above in different conda environments with Python 3.6.10 and 3.7.4, but the problem was not solved. Any ideas as to
Using setuptools, how can I download external data upon installation?
I’d like to create some ridiculously-easy-to-use pip packages for loading common machine-learning datasets in Python. (Yes, some stuff already exists, but I want it to be even simpler.) What I’d like to achieve is this: User runs pip install dataset pip downloads the dataset, say via wget http://mydata.com/data.tar.gz. Note that the data does not reside in the python package itself,
How can I include package_data without a MANIFEST.in file?
How can I include package_data for sdist without a MANIFEST.in file? My setup.py looks like this: Versions: I just can’t get foo/bar.txt included. Or is this blog post still true? http://blog.codekills.net/2011/07/15/lies,-more-lies-and-python-packaging-documentation-on–package_data-/ Over the last hour, though, I’ve learned that these statements are somewhere between “dangerously misleading” and “damn lies”. This is because the primary type of Python package is a
Reliable way to get the “build” directory from within setup.py
Inside the setup.py script I need to create some temporary files for the installation. The natural place to put them would be the “build/” directory. Is there a way to retrieve its path that works if installing via pypi, from source, easy_install, pip, …? Thanks a lot! Answer By default distutils create build/ in current working dir, but it can