All Questions
Tagged with python-packaging python-3.x
234
questions
0
votes
0
answers
23
views
Is it possible to publish a package to PyPI such that it can be imported as a sub-package to other package
I have been glancing through llama-index source code lately. I have come across their integrations and they seem to publish each integration as a different package. However, they modify the import ...
0
votes
0
answers
23
views
Correct way to import modules when building python package
I am building my first ever python package, currently I have this structure:
my_project_root_dir/
└--package_name/
└--networking/
|--__init__.py
└--service_discovery.py
|--__init__....
0
votes
0
answers
45
views
ModuleNotFoundError: No module named 'yolov7'
I am trying out code in this repository.
I run one of the command given in their readme page, but I am getting ModuleNotFoundError:
/workspace/BoTSORT$ python3 tools/mc_demo_yolov7.py --weights ...
0
votes
0
answers
19
views
Zipapp behaviour depends on active environment
I am in environment my_project
My folder structure looks something like this
.
`-- my_project/
|-- my_app/
| |-- __init__.py
| `-- __main__.py
|-- setup.py
|-- README.md
`--...
0
votes
0
answers
21
views
How to obtain path to a python data file using importlib without using a context manager?
My goal is to load datafiles from an installed Python package using the importlib package. To be fair, this package API seems very complex to use to me and many methods seem to be deprecated. I need ...
0
votes
0
answers
69
views
Python Packages . Not installing on IntelliJ Idea (Community Edition) - Attribute Error
I was on IntelliJ Idea Community 2022.2, with the JetBrains' Python Community Edition plugin. I wanted to install the mysql-connector-python package. I tried it from the IDE's own Python Package ...
0
votes
1
answer
30
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/
- ...
1
vote
1
answer
199
views
Setuptools unable to read requirements.txt from pyproject.toml in python 3.12.x
I have a package structure as follows:
program_root/
- src/
- tests/
- data/
- templates/
- docs/
- pyproject.toml
- README
- requirements.txt
My ...
0
votes
1
answer
57
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 ...
2
votes
0
answers
60
views
Using the platform_release environment marker
I'm developing a Python package that has an optional dependency that is incompatible with certain versions of macOS.
Since the dependency is optional, I want my (wheel-based) package installation to ...
0
votes
1
answer
38
views
Unable to import function from custom package built using pyproject.toml
This is my project structure
pkg_root
└───venv
└───requirements.txt
└───pyproject.toml
├───src
│ ├───pkg
│ │ ├───__init__.py
│ │ ├───test_main.py
│ │ ├───config
│ │ │ ├───json
│ │...
0
votes
1
answer
51
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
1
answer
24
views
sklearn-like imports / Hiding from public API
Suppose you have a Python package with a src-layout as follows:
package_folder
...
project.toml
/src
/package
__init__.py
/models
__init__.py
_model_1.py
...
The file ...
2
votes
2
answers
848
views
Unable to import module 'lambda_function': No module named 'Crypto'
I have following python lambda function
lambda_function.py
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad,unpad
import base64
#CBC with Fix IV
data = 'random text to be encrypted ...
1
vote
0
answers
36
views
Is it possible to compile a c extension and a python wrapper of the c extension at the same time?
I was wondering if its possible to have a python wrapper package wrapping a c extension for adding typing support, dataclasses on top of it and solving a bug of type hinting not
working for such ...