#๐Ÿ”’ Installing fastai in my jupyter notebook (venv)

31 messages ยท Page 1 of 1 (latest)

vivid comet
#

Windows 10
VS Code + all necessary extensions

Error:

          [508/526] Compiling C object numpy/_core/_multiarray_umath.cp313-win_amd64.pyd.p/src_umath_umathmodule.c.obj
          [509/526] Compiling C++ object numpy/_core/libx86_simd_qsort.dispatch.h_AVX512_SKX.a.p/src_npysort_x86_simd_qsort.dispatch.cpp.obj
          ninja: build stopped: subcommand failed.
          Activating VS 16.11.16
          INFO: automatically activated MSVC compiler environment
          INFO: autodetecting backend as ninja
          INFO: calculating backend command to run: C:\ProgramData\chocolatey\bin\ninja.EXE
          [end of output]
     
          note: This error originates from a subprocess, and is likely not a problem with pip.
        error: metadata-generation-failed
     
        Encountered error while generating package metadata.
     
        See above for output.
     
        note: This is an issue with the package mentioned above, not pip.
        hint: See above for details.
        [end of output]
     
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: subprocess-exited-with-error
     
      pip subprocess to install build dependencies did not run successfully.
      exit code: 1
     
      See above for output.
     
      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

ร— pip subprocess to install build dependencies did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

(.venv) C:\Users\rohan\OneDrive\Documents\Projects\Jupyter notebooks>```
brazen iceBOT
#

@vivid comet

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

vivid comet
#

my command I use to install fastai is: pip install fastai

#

I tried with admin privileges and without

#

I can install other packages like pandas

#

python interpreter 3.13.1

#

Any advice is much appreciated

cerulean lynx
#

seems like the library only supports uptill python 3.10

#

you might have to downgrade

vivid comet
#

๐Ÿคฆโ€โ™‚๏ธ

#

ok let me try that

#

thanks

vivid comet
#

``(.venv) C:\Users\rohan\OneDrive\Documents\Projects\Jupyter notebooks>pip list
Package Version


annotated-types 0.7.0
blis 1.2.0
catalogue 2.0.10
certifi 2025.1.31
charset-normalizer 3.4.1
click 8.1.8
cloudpathlib 0.20.0
colorama 0.4.6
confection 0.1.5
contourpy 1.3.1
cycler 0.12.1
cymem 2.0.11
fastai 2.7.18
fastcore 1.7.29
fastdownload 0.0.7
fastprogress 1.0.3``

#

seems like it worked

#

thanks @cerulean lynx

#

another questin

#

I always see people just typing import pandas as pd without installing the package using pip. In my case I tried doing that but then I get the error telling me there is no such package. Then I must manually install the package using pip. Is this normal?

trail bluff
#

You must install it, yes

#

They may have something else installed that requires it as a dependency

vivid comet
#

sorry for the screenshot, but as it seems pandas is installed but python says it is not

#

output from pip list is pandas 2.2.3

trail bluff
#

That sounds like you've got a mixup between what python you ran pip under and which python you ran jupyter under

#

!dashmpip

brazen iceBOT
#
Install packages with `python -m pip`

When trying to install a package via pip, it's recommended to invoke pip as a module: python -m pip install your_package.

Why would we use python -m pip instead of pip?
Invoking pip as a module ensures you know which pip you're using. This is helpful if you have multiple Python versions. You always know which Python version you're installing packages to.

Note
The exact python command you invoke can vary. It may be python3 or py, ensure it's correct for your system.

trail bluff
#

^ will hopefully solve that

#

You can also put !pip list inside your notebook to see what jupyter sees

#

...also

#

you may have to restart the jupyter kernel, just in case

brazen iceBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.