774 questions
1
vote
0
answers
82
views
Pycharm fails to find package in the defined PYTHONPATH
I have a Python monorepo. One of the services in this monorepo is "poller-service". Its general structure is:
services/
└── poller-service/
├── .venv/
| └─ ...
...
0
votes
0
answers
100
views
How to make PyCharm recognize dynamic imports for local scripts?
I'm facing a peculiar issue with PyCharm and Python imports. I have a well-organized directory with all my "stable" code, and a separate area for local scripts that are more experimental and ...
0
votes
0
answers
56
views
why won't Pycharm accept my file location for Pythonpath?
I am configuring my robot framework on a project level and am trying to enter my project file location as the pythonpath. Next to the field is this text:
Entries to be added to the PYTHONPATH
(used ...
0
votes
1
answer
157
views
Minimal way to set PYTHONPATH for developing python in VS Code and Jupyter notebook server
Related questions that do not apply:
Set PYTHONPATH for local Jupyter Notebook in VS Code - does not apply to running Jupyter server.
How to set pythonpath at startup when running jupyter notebook ...
2
votes
2
answers
188
views
Persistent ModuleNotFoundError: No module named 'src' in Python Project
I'm working on a Python project with the following structure:
/
├── src/
│ ├── __init__.py
│ ├── afrr/
│ │ ├── __init__.py
│ │ ├── dumper.py
│ │ └── cleaner.py
│ ├── config.py
│ ├──...
0
votes
0
answers
43
views
Python import on sub-package results in "no module named..." error
Although there are a number of import related questions, I haven't found one that directly addresses my question.
I have installed some packages in the default Site Packages folder and it has a ...
0
votes
0
answers
171
views
How should I manage multiple versions of a library in a Python project
I am working on a Python project, which has to support multiple versions of the same package.
For each new version, some of our wrapper classes change, and others remain unchanged from the previous ...
0
votes
0
answers
50
views
Unable to use Absolute Import to get Objects from Package __init__.py (despite PYTHONPATH Setting)
(Neither this question nor this question are duplicates - they are all resolved by setting the PYTHONPATH correctly.)
I have the basic file structure of a Python package, located in ~/github/mypackage:...
0
votes
0
answers
156
views
Visual Studio Code python .env file to work for both Windows and Linux
I want to use exactly the same vscode workspace folder on both Windows and Linux.
As you may know, contrary to Pycharm, the root folder is unfortunately not included in the python path. So for my ...
0
votes
0
answers
66
views
How to re-define PYTHONPATH --completely-- in Visual Studio Code
I need to re-define the PYTHONPATH within Visual Studio Code (VSC) without it inheriting any values from the default PYTHONPATH set in my shell (zsh).
System Information:
macOS: Sonoma 14.6.1,
Visual ...
0
votes
1
answer
205
views
Setting PYTHONPATH in Eclipse/PyDev
Added later: I stupidly capitalized OS rather than using os, so the import and print now works properly. However, the question remains: how can I add a source directory that is outside the project ...
0
votes
0
answers
55
views
Python: Own package not recognized
I have an issue where I dont get the solution.
I also look here in stackoverflow.com, tried different solutions but nothing helps.
My project struct looks like this:
-MyFolder
----MySubFolder
------...
1
vote
1
answer
107
views
How to include the project root folder into PYTHONPATH when running python script in sub folder
Here's my project structure
- folder_1
- folder_2
- file1.py
- file2.py
- folder_3
- file3.py
Now I use this command to run file1.py
python folder_1/folder_2/file1....
0
votes
1
answer
271
views
Pytest ModuleNotFoundError: No module named 'app' despite working in Docker environment
I'm encountering an issue where pytest fails to run tests in my local development environment due to a ModuleNotFoundError, specifically stating that there is "No module named 'app'". ...
0
votes
1
answer
167
views
Run & Debug depends on Windows PYTHONPATH/HOME environment variables
I'm working on a project where I debug with GDB and OpenOCD. Sometimes we use VS Code for this purpose and I encountered an issue that the Run & Debug session won't launch when PYTHONHOME/...