I have a working python script that calls data using elasticsearch python api client. The script was developed for unix/ubuntu environment and works. The script however does not work in windows environment, because some of the modules/functions used in python script (developed in ubuntu environment) are not available. I am not able to get equivalent ..
I have issues with path settings with pytest. Whenever I use pytest within a project, I run into problems how to correctly import stuff. To my setup, I am using Python 3.9 with pytest 6.2. Folder Structure My folder structure looks like this: project_folder/ app_folder/ libs/ __init__.py config.py class_file_1.py class_file_2.py main.py tests/ __init__.py test_class_file_1.py Problem ..
I have an import problem which is probably obvious, but I’m kind of stuck, so I will ask here, maybe you will see it immediately: files structure: foobar_package/ __init__.py classes.py enums.py classes.py: import enums class Foo: … I want Foo class to be importable directly from the package: Instead of: from foobar_package.classes import Foo I ..
I’m trying to create a discord bot, but i have basic problem… I have this on start of code: import discord.py from discord.ext import commands Im gettin that error: PS C:Userstrnka> & "C:/Program Files/Inkscape/bin/python.exe" c:/Python_projects/Discord_Bots/RCN_bot/RCN.py Traceback (most recent call last): File "c:Python_projectsDiscord_BotsRCN_botRCN.py", line 1, in import discord.py ModuleNotFoundError: No module named ‘discord’ But I have ..
First of all I ran "poetry update" which seemed to work. To verify if it actually updated my poetry version I ran "poetry –version" which resulted in the following error: Traceback (most recent call last): File "C:UsersXXX.poetrybinpoetry", line 17, in <module> from poetry.console import main ModuleNotFoundError: No module named ‘poetry.console’ To solve this error, uninstalling ..
I want to run the 3 code snippets from this webpage. I’ve made all 3 one post, as I am assuming it all stems from the same problem of optimum not having been imported correctly? Kernel: conda_pytorch_p36 Installations: pip install optimum OR ! pip install datasets transformers optimum[intel] Both provide same Traceback: Requirement already satisfied: ..
I’m running into problems installing a Python package locally for development on Linux. There is only one Python available, at this location: $ which python3 /home/USERNAME/software/python/Python-3.9.1/bin/python3 For reproducibility, I’ve added the forked python package I’m working with here: https://github.com/evanbiederstedt/edlibtest/tree/main/bindings/python My problem is the following: When I try to locally install the package with pip install ..
I tried running the file but it says Traceback (most recent call last): File , line 1, in <module> from config.constants import CORRELATION_CUTOFF ModuleNotFoundError: No module named ‘config.constants’ config file is in another folder but both files are under the same folder. Source: Python..
good morning, I am programming in python and I got the following error: ModuleNotFoundError: No module named ‘js_of_dice’. I have searched the internet…but I can’t solve it, I would appreciate if you could help me the strange thing is that I do have the file, in fact, if I restart python it works, but other ..
I want to import all modules from a particular directory of a package which I installed using pip, that is, it lies in site-packages. What I tried Let’s say the package name is package and it has a directory called directory. It has many files like a.py, b.py, etc. I need to import all of ..