1,747 questions
2
votes
0
answers
69
views
How to remove certain compiler flags, when compiling a Python extension through setup.py?
My extension is built using python3 setup.py build, which uses all the flags Python wants to -- followed by my own, specified in extra_compile_flags.
I'd like to remove certain flags. For example:
-...
0
votes
1
answer
136
views
python setup.py develop did not run successfully
I ran the official Colab Page of GroundingDINO, but received an error while running the notebook.
Code Block
%cd {HOME}
!git clone https://github.com/IDEA-Research/GroundingDINO.git
%cd {HOME}/...
0
votes
1
answer
56
views
How to refer to source-files outside of Python module directory?
Our project builds a program from sources across multiple "sibling" subdirectories.
We'd like to make (a subset of) the same code accessible directly from Python-scripts. To that end, I ...
0
votes
1
answer
62
views
pySMT using deprecated setup.py
I have installed pySMT for Python 3.12 using PyCharm package manager with a conda environment in Ubuntu 22.04.5 LTS:
$ pip show pysmt
Name: PySMT
Version: 0.9.6
Summary: A solver-agnostic library for ...
2
votes
0
answers
232
views
ImportError: libxxx: cannot open shared object file: No such file or directory [closed]
I am trying to build a Python package that interops with C++ code. I created a PyBind11 wrapper to do the interop. I created a setup.py file following the instructions here:
from pybind11....
0
votes
0
answers
32
views
how to display progress when building from source in `pip install -e .`
maybe there is a better way to phrase this question.
I am trying to build from source of
vllm: https://github.com/vllm-project/vllm which involves building some cuda and cpp source files.
I suspect ...
0
votes
1
answer
250
views
Wheel File Not Including templates Directory and Root Files in Python Package
Background:
I am new to using the standard Python packaging tools and have typically relied on custom tooling. However, I’ve decided to get a better understanding of the packaging process, but I’m ...
0
votes
0
answers
122
views
Failed building wheel for tflite-support for Ultralytics
I'm trying to import a YOLO model from the ultralytics package and having a few issues installing tflite-support. I've tried upgrading wheels, setuptools and ran the suggested command
pip install --...
1
vote
1
answer
1k
views
pip install psycopg2-binary
When I am tryping to use pip install psycopg2-binary in Windows CMD virtual Environment, I get below error:
Collecting psycopg2-binary
Downloading psycopg2-binary-2.9.10.tar.gz (385 kB)
Preparing ...
2
votes
1
answer
559
views
how to let pip install show progress
In the past, I install my personal package with setup.py:
python setup.py install
Now this method is deprecated, and I can only use pip:
python -m pip install .
However, the method with setup.py ...
0
votes
0
answers
59
views
ModuleNotFoundError when trying to compile setup.py using subprocess
I want to write a python script that automatically compiles my python package using the command: python setup.py sdist bdist_wheel
My setup.py is the following:
from setuptools import setup, ...
0
votes
1
answer
246
views
Use setup.py / pyproject.toml to compile a library also in editable install
I am setting up a Python package with setuptools, together with pyproject.toml. The Python code is dependent on a C library that needs to be compiled and installed alongside the code (it's a make ...
-1
votes
1
answer
123
views
Setup.py install error - ModuleNotFoundError: No module named 'ethereum'
I'm trying to install a package using setup.py for a project. When I run the command python setup.py install, I receive a deprecation warning about using setup.py directly. Despite this, the ...
1
vote
1
answer
2k
views
"TOMLDecodeError: Cannot overwrite a value" when installing Python package with pip
I am trying to use the modules I am developing like a package using python -m pip install -e . - I ran this command inside the package directory where setup.py is at the root of the directory.
I am ...
1
vote
0
answers
431
views
Setting dependencies in pyproject.toml for `pip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.0+cpu.html`
I am writing a setup script pyproject.toml and need to include dependencies for a package that could be installed with pip like this: pip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.0+...
0
votes
0
answers
65
views
Installing Pyhton package from local directory error
When installing a Python package a colleague sent as a directory (with setup.py), I'm getting:
LookupError: setuptools-scm was unable to detect version for '/home/michael/Downloads/inversion/s2shores'....
-1
votes
2
answers
887
views
python setup.py when i get setuptools but error
An error occurs after running python3 -m pip install --upgrade setuptools
error code like this:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\...
0
votes
0
answers
201
views
How to add files outside of src directory to Python wheel
I have a Python package with the following directory structure:
project_root_dir/
├── config/
│ └── (config files)
├── src/
│ ├── sophios/
│ │ └── (source files)
├── setup.py
├── MANIFEST.in
...
0
votes
0
answers
62
views
Python Package Building with Complex Src Layout
I've been working at this for a good while but I've just been spinning my tires. I have utilities that I want to place into their own repos/packages so they can individually be used, but I also want ...
0
votes
2
answers
2k
views
What to use instead of distutils in setup.py python3.12
I'm trying to create a setup.py file and found that distutils has been deprecated. Is there something else setup.py or distutils has been replaced by which I am meant to use instead or should I try ...
1
vote
0
answers
69
views
How to ensure that at least one optional dependency is specified during installation of a python wheel?
I have a unique use case where my python package specifies 3 optional dependencies to setuptools.setup using the extras_require argument. While each of those individual dependencies is kind of ...
0
votes
1
answer
218
views
How to import a private repo into a project using pipenv
I have a common utils repo with a setup.py. I am trying to install this in a new repo using pipenv and am struggling to get it running.
I don't often play with setup.py so am definitely doing ...
0
votes
0
answers
72
views
Setup.py doesn't see scripts
I have a code in my setup.py file:
from setuptools import setup, find_packages
setup(
name='PBI_telegrambot',
version='0.0.1',
author='junscience',
description='Embedding app for ...
0
votes
0
answers
132
views
Use CMake to build Cuda based python extension in setup.py
I'm using 3D Gaussian Splatting, which consists of a Cuda/C++ based python extension. I want to use CMake to compile it in setup.py. My basic idea is to generate .so file with CMake, and use this ...
0
votes
1
answer
61
views
Automatically extend all imports within python project by prefix
I am trying to convert my python 3.11.3 project into a package via a setup.py. The general structure is something like this
- project_name/
- setup.py
- project_name/
- sub_module/
- ...
4
votes
0
answers
136
views
How to include C++ header and source files in a Python package for PyPI distribution?
I'm trying to include C++ header and source files in my Python package because I use them in the Python files of my package (via cppyy). It works fine on my local PC, but when I build the package for ...
0
votes
1
answer
64
views
`pip install .` successfully installs - but calling raises: ModuleNotFoundError: No module named - importing it works fine
Quick description: CLI made with click that interacts with spotify using dbus-python. Go to the github page if you need more info I suppose - or try it yourself if you are so inclined. I'm running on ...
0
votes
1
answer
204
views
How to correctly use python __init__.py in packages
I have such structure lib.
PLUS The setup.py in the root
I want to create a package. How should I correctly set up the init.py in this case. Because after python setup.py sdist and python setup.py ...
-1
votes
1
answer
43
views
Build distribution package for different platform architecture
We have Jenkins pipeline that runs on X86 architecture and invokes following command:
python setup.py sdist bdist_wheel
I would like to build a package for ARM-based architecture. Is it possible by ...
-1
votes
1
answer
207
views
Make version.py visible from setup.py when using pyproject.toml
I have a project with this file structure:
project/
|- ...
|- include/
\- version.hpp
|- conanfile.py
|- pyproject.toml
|- setup.py
\- version.py
version.hpp is the only point where I keep the ...
-1
votes
2
answers
556
views
How to copy requirements.txt and setup.py files into docker image from parent folder [duplicate]
Here is the directory structure of my project:Directory tree
From the backend folder, I want to create a Docker image that loads the setup.py and requirements.txt files which are in the parent folder. ...
0
votes
1
answer
894
views
"Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects",
I am installing niwidgets , during the installation it throws wheel compilation error:
** Building wheel for scikit-learn (setup.py) ... error
error: subprocess-exited-with-error
python setup.py ...
3
votes
2
answers
945
views
How do I have multiple src directories at the root of my python project with a setup.py and pip install -e?
I want to have two src dirs at the root of my project. The reason is that one is code I want to work without modifying any of the imports. The second is new code indepdent of the "old code". ...
0
votes
2
answers
407
views
Python setup.py "AttributeError: module 'app' has no attribute 'main'"
I made a project in Python with this project structure:
G:.
│ .gitignore
│ ReadMe.txt
│ requirements.txt
│ setup.py
│
├───.vscode
│ settings.json
│
├───app
│ │ app.py
│ │ models....
0
votes
1
answer
286
views
unknown file type '.pxd' when installing my package
I'm trying to install a package that I'm maintaining (pygtftk). I'm using the latest version and would like to go on with the development but I'm not able to install it under Python 3.10.14 due to ...
0
votes
1
answer
79
views
Python unable to locate the user defined package after installation
I'm doing a PoC on Python package creation. I have followed the steps mentioned in the link.
Please find below the sample project structure
demopackage
|--__init__.py
|--config
| |--__init__....
0
votes
2
answers
1k
views
Unable to install setup.py
I am running the following command:
python setup.py install
However, I get this error message:
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\...
1
vote
1
answer
281
views
Including non-Python files without __init__.py using `package_data` in setup.py?
Given this directory structure (empty __init__.py and logging.yml is fine):
foo
│ setup.py
│
└─── foo
│ __init__.py
│
└─── config
logging.yml
Here is my attempt, this ...
0
votes
1
answer
84
views
setup.py code to run on `pip install` but not on `python -m build`
I have some code in a setup.py file that checks for a third-party SDK that must be manually installed before the application is installed:
import sys
from setuptools import setup
# ---- BEGIN SDK ...
1
vote
2
answers
2k
views
Run a shell script during pip install [duplicate]
I have published a PyPI package which requires some additional Apt packages and so I have a setup.sh in my Github repository which I want to execute along with the installation process of pip install ...
0
votes
1
answer
53
views
Simulation of interrupted set-up and delayed server shutdown in batch processing system
I would like to create a system with servers that need time to set up before being ready to serve. The system starts to set up whenever enough 2 customers are in the queue.
When a batch (group of 2 ...
1
vote
0
answers
108
views
How can a python unit test work with data files specified in setup.py package_data
I have json files which I would like to embed within my Python package.
I've read about using package_data in my setup.py and then using importlib.resources to access the data files at runtime (as ...
1
vote
0
answers
313
views
Python package I made installls dist-info instead of the package
So I just tried to create my first python package on the testing python package index and when I install the packaged I only get the dist-info. The github is here and the its located here on the ...
1
vote
0
answers
74
views
Unable to import functions from modules
I tried to create a module using setup.py to practise my understanding of packages and __init__.py files. But I get the following error -
Traceback (most recent call last):
File "/home/thoma/...
0
votes
1
answer
237
views
Issue with Python Package Upload to PyPI - Invalid Directory Structure
I am encountering an issue while uploading my Python package to PyPI. I have followed the standard steps for creating a distribution package using python setup.py sdist and python setup.py bdist_wheel,...
1
vote
1
answer
7k
views
Error during pip install -r requirements.txt due to "-e ."
I'm encountering an issue while trying to install the dependencies for my Python project using pip install -r requirements.txt.
The error I'm receiving: It's due to -e . present in requirements.txt
...
0
votes
0
answers
32
views
custom Python package seemingly installs but ModuleNotFound on import
I am trying to turn my python code into a package.
I have the following structure
package_name
src/
__init__.py
module/
__init__.py
code.py
module2/...
0
votes
0
answers
20
views
Error during package installation from testpypi [duplicate]
I wrote a library package and uploaded it to pypi.On trying to install it using the pip command, I am getting an error.
The setup.py file has install_requires with the below:
install_requires=['...
0
votes
1
answer
176
views
Python module setup.py dependency updates by Renovate combined with GitLab Package Registry
We have Python modules, which were referencing other Python modules from an internal GitLab Package Registry. The setup.py looks like the following:
import setuptools
setuptools.setup(
name="...
0
votes
0
answers
66
views
Import Error while making a package using setup.py
I am trying to build a python package which has a setup.py file , I created an entry point but I run through it then it gives import error otherwise if run normally in vs code it does not gives import ...