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

Update fastcore>=1.5.27, nbdev broken on conda install #1470

Open
ericperez-01 opened this issue Nov 19, 2024 · 0 comments
Open

Update fastcore>=1.5.27, nbdev broken on conda install #1470

ericperez-01 opened this issue Nov 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ericperez-01
Copy link

Create a new environment in conda and try to create new repo:

conda create -n test_name python=3.12 nbdev -y
conda activate test_name
mkdir test
cd test
nbdev_new

You will get an error:

nbdev_new
Traceback (most recent call last):
  File "/Users/eric/micromamba/envs/test_name/bin/nbdev_new", line 6, in <module>
    from nbdev.cli import nbdev_new
  File "/Users/eric/micromamba/envs/test_name/lib/python3.12/site-packages/nbdev/cli.py", line 11, in <module>
    from .processors import *
  File "/Users/eric/micromamba/envs/test_name/lib/python3.12/site-packages/nbdev/processors.py", line 23, in <module>
    from execnb.shell import *
  File "/Users/eric/micromamba/envs/test_name/lib/python3.12/site-packages/execnb/shell.py", line 10, in <module>
    from fastcore.ansi import ansi2html
ModuleNotFoundError: No module named 'fastcore.ansi'
(test_name)

Temp solution is to install fastcore to the latest:

 pip install -U fastcore
Requirement already satisfied: fastcore in /Users/eric/micromamba/envs/test_name/lib/python3.12/site-packages (1.5.29)
Collecting fastcore
  Using cached fastcore-1.7.20-py3-none-any.whl.metadata (3.5 kB)
Requirement already satisfied: packaging in /Users/eric/micromamba/envs/test_name/lib/python3.12/site-packages (from fastcore) (24.1)
Using cached fastcore-1.7.20-py3-none-any.whl (83 kB)
Installing collected packages: fastcore
  Attempting uninstall: fastcore
    Found existing installation: fastcore 1.5.29
    Uninstalling fastcore-1.5.29:
      Successfully uninstalled fastcore-1.5.29
Successfully installed fastcore-1.7.20
(test_name)

After update to latest fastcore, nbdev_new works fine. I suggest just increasing the fastcore requirement to the version that stops breaking nbdev_new.

Thanks!

@ericperez-01 ericperez-01 added the bug Something isn't working label Nov 19, 2024
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

No branches or pull requests

1 participant