1,746 questions
0
votes
0
answers
31
views
docker run a container with an installed python script results in duplicate & improperly sequenced logs
I have a containerized python app. It's an app that runs tests
This is the setup.py, it essentially creates a "console script" called "tsdm" that runs my app's entry point.
# setup....
19
votes
2
answers
7k
views
Distribute shell scripts using setuptools and pyproject.toml
I'm trying to distribute a shell script along with a Python package. Ideally, the shell script is installed when I run pip install my_package. I read from this SO that, my expected behavior is exactly ...
2
votes
0
answers
40
views
Is there a way to extract project metadata without Pip-installing it? [duplicate]
I am developing a project using Setuptools, and in a couple of places (e.g. scripts, the Sphinx docs) I want to be able to use pieces of project metadata, such as the version, name, authors, etc. I ...
3
votes
1
answer
245
views
How do I package non-code data with python setup.py
I have a python project with the below structure
my-project
venv
tests
setup.py
abc
__init__.py
my_pckg
__init__.py
foo.py
static
data_0.txt
...
0
votes
1
answer
3k
views
"metadata-generation-failed" due to "FileNotFound error during installation of scrappy
I am trying to install the Python module Scrappy but the requirements.txt file is not found. I'm using Python 3.10.4 and pip 22.2.2. I tried running
pip install -r requirements.txt
which produced the ...
0
votes
0
answers
354
views
pip install from local directory doesnt add [build-system] dependencies
In our project (Locust) we use setuptools_scm for versioning, so it is needed for all installations from local directory.
We used to have this specified in setup.py:
setup(
setup_requires=["...
13
votes
7
answers
182k
views
`pip install` Gives Error on Some Packages
Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well:
pip install chatterbot
...
1
vote
2
answers
1k
views
Python py2exe executable attributeerror
I am trying to create an executable for a script I have already written. It will be used by a coworker who doesn't have python on their machine, so I want to create an executable to make their life ...
6
votes
2
answers
3k
views
getting no develop install with `pip install -e .` unless I delete `pyproject.toml`
I have the following situation that pip install -e . does not build the develop version unless I delete the pyproject.toml which does not contain packaging information, but black configuration.
Does ...
2
votes
0
answers
204
views
Python py2app setup.py error "ImportError: No module named sip"
I'm using py2app to convert my python program to an .dmg on MacOS. The packages that I used are (Tkinter, Folium, and Pandas) and I have a few dependencies for the application to run. (.json, .cvs and ...
3
votes
2
answers
1k
views
Obtain the version of a setup.cfg package
When using setup.py in a Python project, we can simply run
$ python3 setup.py --version
And this will give us the version field that is set in the setup.py file. This saves us using sed or something ...
0
votes
3
answers
2k
views
Accessing modules in subdirectory when building pip package
This is my project structure currently;
repository/
|---- setup.py
|---- package_name/
|---- __init__.py
|---- module_a.py
|---- subdir/
|---- __init__.py
|---...
2
votes
2
answers
6k
views
Unable to install requirements.txt. TypeError: entry_points() got an unexpected keyword argument 'group'
After git pulling upstream main from a repo I'm working on with about 10 other developers, I've been trying to pip install -Ur requirements.txt but it keeps coming up with this error and I've tried ...
2
votes
0
answers
321
views
Console scripts outside the main module aren't packaged along (ModuleNotFoundError)
Behold, my tree:
src/
├── bin
│ ├── cli.py
├── mypackage
│ ├── __init__.py
│ ├── api.py
│ ├── models
│ └── utils.py
Now, observe, my setup.cfg:
[options]
zip_safe = False
packages = find:
...
0
votes
1
answer
3k
views
cl : Command line warning D9002 : ignoring unknown option "-O3"
I want to build a project that uses various flags by type -O3 -Wall -std=c++11 using cython, but I get an error:
cl : Command line warning D9002 : ignoring unknown option
Maybe it is possible to ...
0
votes
1
answer
2k
views
ModuleNotFoundError: No module named 'html.entities'; 'html' is not a package
Newbie coder here. So im trying to pipenv install django but i keep getting this error :
$ pipenv install django
Creating a virtualenv for this project...
Pipfile: C:\Users\wesleyromero308\Desktop\...
0
votes
0
answers
286
views
Creating Python Package (setuptools) - No module named
I'm trying to create a python package for the first time, using setuptools.
Let's imagine my package is named qwerty.
Here's my project structure:
qwerty (folder)
++ src (folder)
--++ __init__.py
--++ ...
1
vote
1
answer
143
views
What is the smallest possible layout for a simple Python library?
If sharing a Python library via PyPI, so that someone else can download it with pip and import it in their code, the minimal layout that I know of is this:
+ foo
+ src
+ bar
__init__.py
...
1
vote
0
answers
271
views
Pipenv and setup.py workflow
I am developing a package Pkg-1 in Python and my workflow is as follows:
I use pipenv to install a dependency A of Pkg-1 with pipenv install A and then I install Pkg-1 with pipenv install -e .
Now I ...
3
votes
1
answer
618
views
Install Package Using setup.py and Excluding Dependencies
I am interested in running a script that is part of a rather large Python package. The package structure looks something like this:
MyApp
|
--setup.py
|
--MyApp
|
--foo
|
--scripts/some-tiny-...
1
vote
0
answers
207
views
Create multiple entrypoint in python setup.py
Currently my setup.py looks like this:
setup(
name="package",
entry_points={
'console_scripts': [
'package = src.utils:main'
],
...
1
vote
1
answer
2k
views
setup.py - metadata-generation-failed
So after a couple weeks of coding in my free time I decided to publish my first package to PYPI.
I followed this good guide I found on Medium on how to publish to PYPI and to create setup.py I ...
1
vote
0
answers
76
views
Dynamic package installation depend upon the specific system using setup.py install_requires
I have a setup.py as below configuration
setup(
install_requires = ['django == 2.0']
)
I would like to modify the setup.py based on docker usage.
If user uses docker then the configuration must be
...
2
votes
0
answers
641
views
Pip install global-option"-I<library path> Option -I is not recognised
I am installing a python module that require compilation inside a conda environment. The base installation fails because pip is not looking for the Python.h file in the proper location. To fix this, ...
0
votes
1
answer
520
views
Install a folder with __init__.py in a python package downloaded as a git submodule
In my python project, there is another python project s2p downloaded as a git submodule. How can I install my project and only the s2p folder in s2p project without running s2p/setup.py in s2p project....
1
vote
1
answer
531
views
setuptools post-install: get all packages installed to check versions
In Post-install script with Python setuptools, this answer shows how to make a post-install command.
I want to make a post-install command that checks for a version matchup between sub-packages from a ...
0
votes
1
answer
1k
views
How to include precompiled .so and .dll files with a python package?
I have a python project that relies on precompiled .so (Unix) and .dll (Windows) files to work that I am trying to convert into an installable package. But, I cannot figure out how to get the .so and ....
1
vote
1
answer
430
views
Dagster-image cli
recreate the image deployment describe here:
https://github.com/dagster-io/dagster/tree/master/python_modules/automation/automation/docker/images
How do I install the dagster-image cli?
dagster-image ...
0
votes
1
answer
1k
views
Installing c library with setup.py
I have written a python package I'm trying to install. With a structure:
packagename
|
|--- setup.py
|--- module_name
|
|--- library.c
The library.c file has been ...
0
votes
0
answers
14
views
load static config files in python package created by setuptools [duplicate]
I am packaging my app where I need to load a config.yaml file which resides in my project. After doing pip install I am seeing the file is present in package but it's not picking up the file.
My ...
3
votes
4
answers
35k
views
mariadb_config not found installing mariadb package [duplicate]
I try to install mariadb package on my ubuntu 20.04 and I get this message :
Collecting mariadb
Using cached mariadb-1.1.3.tar.gz (80 kB)
Preparing metadata (setup.py) ... error
error: subprocess-...
-1
votes
1
answer
302
views
how python setup.py determines output path?
I build netifaces module with "python setup.py buiild". But during two build process, the output path is different.
First build, the output path is lib.linux-x86_64-3.9
Second build, the ...
2
votes
0
answers
157
views
How to bound dependency versions of requirements in setup.py?
It is best practice to specify project dependencies for a package in setup.py install_requires according to https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/ and ...
0
votes
1
answer
2k
views
Basic setup.py - include the shared library
I am packaging a Python package with around 20 Python modules and one shared library[1]. I have create the following setup.py file:
from setuptools import setup, find_packages
setup(
name = "...
1
vote
0
answers
103
views
Importing other files when using python setuptools entry_points - no module named
I am not familiar with setuptools so I hope this is a simple mistake (but couldn't find anything related).
I have this in my setup.py
entry_points={
'console_scripts':[
'filea=autostart....
46
votes
5
answers
25k
views
Is there a simple way to convert setup.py to pyproject.toml
We have multiple python projects, and are considering converting them to use pyproject.toml instead of setup.py.
Is there a simple way to automate this?
4
votes
1
answer
11k
views
How to set up properly package_data in setup.py?
I am facing an error like No such file or directory.... Could anyone help me with this out? I'd really appreciate it! This is the directory:
And this is the setup.py code:
from setuptools import ...
1
vote
1
answer
456
views
Failed to install google-assistant-sdk[samples] to raspberry pi Zero W
I am attempting to install the Google Assistant to a raspberry pi Zero W.
During the last step it to failed to complete install google-assistant-sdk[samples].
I am running python 3.9.2 on the pi Zero. ...
0
votes
0
answers
366
views
Use setuptools find_packages to exclude everything except package
I want to build a package using setup tools. To import package I am using find_packages from setuptools. I have lots of directory and I want to include only few of them. How can I achieve exclude ...
0
votes
0
answers
955
views
Setuptools: Creating custom command to install selected package dynamically
I have following package tree , I want to install the particular package from src and base (always install with selected package from src). I am trying to create custom command so that using pip I can ...
3
votes
1
answer
6k
views
Setuptools package discovery
I have below package tree for my project
└── src
| ├── mypkg1
| │ ├── module1.py
| │ ├── module2.py
| │ └── __init__.py
| | |-- setup.py
| | |__ requirements.py
| └── ...
0
votes
1
answer
5k
views
How to solve setup.py error during install dlib in Python
How could i solve this error i tried many ways to instal cmake installed succesfully but the dlib getting error everytime to install
c++ and visiual studio also installed
C:\Users\Admin>pip ...
0
votes
1
answer
1k
views
installation of multiple setup.py in the same directory for local packages
I'm working with the following directory structure:
package1/
package_content1
package2/
package_content2
setup.py
Up until now I usually installed with pip install -e . commenting the part ...
1
vote
1
answer
1k
views
ModuleNotFoundError when using setup.py install version of package, but not locally-
Problem
python setup.py install installs a package I'm developing all fine, but when I try importing the package I get a "ModuleNotFoundError" saying that a local package could not be found....
0
votes
0
answers
236
views
What is the best practice to download executable binary file and include in setup.py
Working on the setup.py and having hard dependency on downloading a zip file and extract from it the executable binary.
The goal:
downloading XXX.zip, and being able to run the xxx.exe as part of my ...
1
vote
1
answer
468
views
Circular dependency issue with setup script
I'm writing a python setup.py script for an own package which needs a version constant from the package. However, the package needs to have some dependencies installed.
Therefore I specified ...
1
vote
1
answer
913
views
Adding non-python files to colcon build
Building my workspace with colcon, some OSM files which are found in a directory "OSM" in a sub_package in the workspace are not found in built space. So when I go to the install space, the ...
1
vote
1
answer
640
views
pip show not showing requirements
When I run the pip show command on my package Classeviva.py I get the following.
D:\Python\Python\Classeviva>pip show classeviva.py
Name: Classeviva.py
Version: 0.1.1.post1
Summary: Classeviva ...
1
vote
1
answer
149
views
Dependencies file requirements-freeze.txt not found when installing my python package from corporate artifactory
My library is being installed from a corporate artifactory repo using the old-school setup.py . But the requirements-freeze.txt is not being found
$pip3 install --force-reinstall hercl --index https://...
13
votes
2
answers
13k
views
Migration from setup.py to pyproject.toml: how to specify package name?
I'm currently trying to move our internal projects away from setup.py to pyproject.toml (PEP-518). I'd like to not use build backend specific configuration if possible, even though I do specify the ...