Skip to content Skip to sidebar Skip to footer
Showing posts with the label Python Packaging

How Do I Use A Relative Path In A Python Module When The Cwd Has Changed?

I have a Python module which uses some resources in a subdirectory of the module directory. After … Read more How Do I Use A Relative Path In A Python Module When The Cwd Has Changed?

How To Resolve "valueerror: Attempted Relative Import Beyond Top-level Package"

I have the following problem with my project, help me please! Here is the structure of my package: … Read more How To Resolve "valueerror: Attempted Relative Import Beyond Top-level Package"

Python: Weird Import Behaviour

I have a package with the following structure projectX ├── data ├── results └── projectX ├── s… Read more Python: Weird Import Behaviour

Getting Python Package Distribution Version From Within A Package

You can get the version of a python distribution using import pkg_resources pkg_resources.get_distr… Read more Getting Python Package Distribution Version From Within A Package