Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

CLI commands from other packages only work with pdm run #38

Open
hoangthienan95 opened this issue May 19, 2022 · 1 comment
Open

CLI commands from other packages only work with pdm run #38

hoangthienan95 opened this issue May 19, 2022 · 1 comment

Comments

@hoangthienan95
Copy link

hoangthienan95 commented May 19, 2022

Describe the bug
I thought that one of the benefits of pdm-venv was to not type pdm run [comand] every time. However, I could not invoke CLI commands from other packages without running pdm run, even when the environment is activated

(.venv) anhoang@c2b9 /lab/corradin_biobank/FOR_AN/test-project$ which python
/lab/corradin_biobank/FOR_AN/test-project/.venv/bin/python

(.venv) anhoang@c2b9 /lab/corradin_biobank/FOR_AN/test-project$ which pdm
/home/anhoang/.local/bin/pdm

(.venv) anhoang@c2b9 /lab/corradin_biobank/FOR_AN/test-project$ which jupyter
/lab/corradin_data/FOR_AN/anaconda3/envs/jupyterlab/bin/jupyter 
#should be /lab/corradin_biobank/FOR_AN/test-project/.venv/bin/jupyter

To Reproduce
Steps to reproduce the behavior:

  1. Install pdm using curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 - into $HOME/.local/bin. Then pdm plugin add pdm-venv
  2. pdm config venv.in_project True; pdm config install.cache True
  3. Create a new project test-project
  4. pdm use 3.9; pdm venv create; pdm add nbdev, jupyter
  5. eval $(pdm venv activate in-project)
  6. Do either CLI commands from installed package: jupyter or nbdev_new
  7. pdm run jupyter and pdm run nbdev_new works as expected

System (please complete the following information):

  • pdm-venv version: 0.5.0
  • Python version: 3.9
  • OS: Linux
@frostming
Copy link
Contributor

Not sure if it does work well with conda. Try changing the backend to conda for venv creation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants