Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3200

Programming • [Python] Package installed by apt, but pipenv says ModuleNotFoundError: No module named 'simplejson'

$
0
0
Hello.

I want to try to use python library PyPasser, which is not in Debian, but it is in PyPi.
My script also use simplejson, which is in Debian repository.
When I run pipenv in directory of script, I got no error or warning:

Code:

$ pipenv install PyPasserInstalling PyPasser...Installing dependencies from Pipfile.lock (b4c779)...To activate this project's virtualenv, run pipenv shell.Alternatively, run a command inside the virtualenv with pipenv run.
But when I want to run script, I get error (name of directory is filtered by me):

Code:

$ pipenv run python3 ./produkty.py Traceback (most recent call last):  File "/home/ruwolf/<filtered>/produkty.py", line 20, in <module>    from simplejson.errors import JSONDecodeError as simpleJSONDecodeErrorModuleNotFoundError: No module named 'simplejson'

It is the same, when I run it in shell.

Code:

$ python3 --versionPython 3.11.2

Code:

$ pipenv --versionpipenv, version 2022.12.19

Code:

$ pip --versionpip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11)

Code:

$ virtualenv --versionvirtualenv 20.17.1+ds from /usr/lib/python3/dist-packages/virtualenv/__init__.py
What could be wrong? And how can I solve it?

P.S.
I have found the same error on AskUbuntu or similar page, somebody has recommend to install python3-distutils and python3-apt, but I have them, too; I have installed also python3-distutils-extra.

Statistics: Posted by ruwolf — 2024-09-24 12:51 — Replies 0 — Views 51



Viewing all articles
Browse latest Browse all 3200

Trending Articles