Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDM does not correctly install packages working in the same top level directory #2378

Closed
1 task done
sdebruyn opened this issue Nov 7, 2023 · 2 comments · Fixed by #2381
Closed
1 task done

PDM does not correctly install packages working in the same top level directory #2378

sdebruyn opened this issue Nov 7, 2023 · 2 comments · Fixed by #2381
Assignees
Labels
🐛 bug Something isn't working

Comments

@sdebruyn
Copy link

sdebruyn commented Nov 7, 2023

  • I have searched the issue tracker and believe that this is not a duplicate.

Projects like dbt and its adapters make use of the same top level directory (dbt) to install one or more adapters into dbt. When you install dbt-postgres using pip, you correctly see the adapter in the folder dbt/adapters in your site_packages. When you do the same with PDM, the adapter is not there. It cannot be found by Python either.

Steps to reproduce

  1. pdm init
  2. pdm add dbt-postgres
  3. .venv/bin/python -c 'from dbt.adapters.postgres import PostgresAdapter'

Actual behavior

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'dbt.adapters.postgres'

Expected behavior

No error

Environment Information

PDM version:
  2.10.0
Python Interpreter:
  /Users/sam/projects/pdm-dbt-adapters/.venv/bin/pyth
on (3.11)
Project Root:
  /Users/sam/projects/pdm-dbt-adapters
Local Packages:
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.6",
  "os_name": "posix",
  "platform_machine": "arm64",
  "platform_release": "23.0.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 23.0.0: 
Thu Aug 17 21:24:46 PDT 2023; 
root:xnu-10002.1.11~3/RELEASE_ARM64_T6020",
  "python_full_version": "3.11.6",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "darwin"
}
@sdebruyn sdebruyn added the 🐛 bug Something isn't working label Nov 7, 2023
@xzmeng
Copy link
Contributor

xzmeng commented Nov 7, 2023

try pdm config --local install.cache false to disable the cache.

Or pdm config --local install.cache_method pth to not use symbolic link.

@sdebruyn
Copy link
Author

sdebruyn commented Nov 7, 2023

Awesome, that works! Thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants