Questions tagged [pkg-resources]
92 questions
2
votes
1 answer
pkg_resources.DistributionNotFound: pyramid==1.3a7
So, a few days ago, I was trying to boot up Django with pyramid and work some web magic way outside of my skillset and ended up messing up a lot of important things. For a while I couldn't even run python. I ended up fixing that by changing my…

Jeremy Thiesen
- 167
- 2
- 14
1
vote
0 answers
Setuptools include tesserocr package and custom traineddata into my pypi package
I'm developing a pip package atm which relies on the tesserocr package. I have my own custom traindeddata being included into my pypi package, but when I go to create the PyTessBaseAPI for the package demo I'm not sure how to set the path.
Here's…

Justin
- 11
- 2
1
vote
0 answers
How to include and excute another pkg file with my pkg installer, build with electron-builder
i have a Mac desktop app which should be installed and communicates with an external tool(installed via dmg). Now i created a dmg installer which copies both dmgs into applications. fine.
But with a new feature the external tool needs some scripts…

Paddel_Bln
- 11
- 1
1
vote
1 answer
TypeError from pkg_resources when using static assets in Pyramid
Trying to set up static assets on a Pyramid app. I used the following call:
config.add_static_view(name='static', path='toolsofknowledge:static')
The file main.css is stored under toolsofknowledge/static/main.css, as expected. The…

amoe
- 4,473
- 4
- 31
- 51
1
vote
1 answer
Get parsed entries for Distribution/module metada from PKG-INFO (Python pkg_resources)
I'm currently using code similar to this
# Returns PKG-INFO in "email format", meaning it looks a little like this:
# Name: some_python_module
# Version: 1.2.3
dist = pkg_resources.get_distribution('some_python_module')
pkginfo =…

xjcl
- 12,848
- 6
- 67
- 89
1
vote
1 answer
How to add autocompletion to a pip package `console_scripts` entry point?
There's many resources floating around on how to hook up your own Python shell with autocompletion (using readline, or rcompleter) but none seem to mention how to do this for the command wrappers generated for pkg_resources' console_scripts. Is it…

Robin De Schepper
- 4,942
- 4
- 35
- 56
1
vote
1 answer
Standard process to locate file locations in Python and pyinstaller?
Is there a standard process in locating files in Python? If I have a data file my code is using as reference, different packaging managers store the files in different locations.
Was recommended to use:
import pkg_resources
resource_pkg =…

Joseph Luce
- 11
- 1
- 3
1
vote
0 answers
Jinja2 to exe via cx_freeze not working. pkg_resources issue
my python windows app is using jinja2, after freezing the app via qx_freeze I'm getting an error with jinja2 function.
From how I understand is that jinja2 is trying to use pkg_resources, which is working fine before I freeze my app. This is my…

Boris Klenovsek
- 21
- 3
1
vote
2 answers
pkg_resources DeprecationWarning for use of '..' in resource path
In a Python package I have a data file which is nested 'above' a file which requires it. e.g.
package
data
data.csv
utils
util.py
In util.py I obtain the file as a stream using pkg_resources; this allows the code to be run from source…

ska_james
- 59
- 1
- 6
1
vote
1 answer
`pkg_resources.working_set` contains distributions whose name begins with character "-"
On my installation (Python 3.8.1 on Windows 7), if I run the following code:
import pkg_resources
print([d.key for d in pkg_resources.working_set if d.key[0] == "-"])
I get the following output:
['-fi', '-', '-.fi', '-ffi']
What are these packages…

lucatrv
- 725
- 8
- 14
1
vote
3 answers
How can I manually register distributions with pkg_resources?
I'm trying to get a package installed on Google App Engine. The package relies rather extensively on pkg_resources, but there's no way to run setup.py on App Engine.
There's no platform-specific code in the source, however, so it's no problem to…

Chris B.
- 85,731
- 25
- 98
- 139
1
vote
1 answer
TF 2.0 TensorBoard 2.0.2 ValueError: Duplicate plugins for name projector
I had some problem with my tensorboard, when I start to launch it, it raises the error:
ValueError: Duplicate plugins for name projector
I followed this comment and it appears there are 2 tensorboards installed on my system:
import…

Valentin Vignal
- 6,151
- 2
- 33
- 73
1
vote
1 answer
Is there a way to define resource directories (not just filenames) for extraction with pkg_resources in Python?
I am going over the pkg_resources documentation (https://setuptools.readthedocs.io/en/latest/pkg_resources.html) and trying to implement an object similar to resource_filename, but I just want the resource directory that the file exists in. Do I…

justadampaul
- 979
- 1
- 7
- 11
1
vote
2 answers
Can't perform this operation for unregistered loader type - Is there any workaround the fact that pkg_resources are not supported by pyinstaller?
I'm new to pyinstaller and I'm getting this error (NotImplementedError: Can't perform this operation for unregistered loader type) when I try to import a file with my App.
The complete traceback is:
Exception in Tkinter callback
Traceback (most…

user9509092
- 31
- 7
1
vote
1 answer
Why would you execute code in a local scope just to update the global scope?
In pkg_resources module you have this weird function:
@_call_aside
def _initialize_master_working_set():
# A bunch of ugly code, and then finally:
globals().update(locals())
The _call_aside is a decorator defined like this, it calls the…

wim
- 338,267
- 99
- 616
- 750