No module named "fastai" - python

I'm trying to use fastai to figure out an optimal learning rate for my neural network. Everything else is working fine I'm just not quite getting the accuracy I want. So I'm trying to use the following lines of code to optimize my learning rate:
learn.lr_find()
learn.sched.plot_lr()
So I pip installed fastai and everything seemed like it installed correctly and into the correct directory, but every time I try to import fastai, I can't. I included pictures of my command prompt and the error message. Thank you all for the help in advance I really appreciate it. If I didn't provide enough info just let me know. I'm new to asking questions on here.
Error Message
Installation of Package

From the screenshots provided, it seems like you didn't install FastAi properly and you were installing PyTorch instead. FastAi comes with a PyTorch build. So you don't need to install PyTorch separately.
You can install FastAi with Pip by the following command
pip install fastai
If you are using Python 3.x sometimes you might need to use pip3 command instead
pip3 install fastai
Another problem might be Python mismatch. Maybe you've installed the both version of Python and you distro couldn't verify from where to grab the package. So make sure to use the correct Python and Pip version

I had a similar issue where I installed fastai with pip. I got the 'No module named fastai' error whenever I tried to import fastai, but if I did "pip freeze | grep fastai" in the terminal, it showed that fastai was clearly installed.
The solution for me was to download anaconda3, enter an anaconda environment, and reinstall fastai with conda using step 6 of fastai's setup instructions for using AWS EC2 instances.
Useful links:
https://docs.anaconda.com/anaconda/install/linux/
https://course.fast.ai/start_aws.html

conda install -c fastai fastai

I would recommend waiting for the new release of fastai, they are currently working on version 2 in July.
Learner.lr_find(start_lr=1e-07, end_lr=10, num_it=100, stop_div=True, show_plot=True, suggestions=True)

Related

No module named 'mlflow.sklearn'; 'mlflow' is not a package

installed mlflow on my windows machine with
pip install mlflow
followed by other dependent library pandas,numpy,sklearn
Ran a tutorial on wine quality model from the give link
https://www.mlflow.org/docs/latest/tutorials-and-examples/tutorial.html
I am getting the below error.
import mlflow.sklearn
ModuleNotFoundError: No module named 'mlflow.sklearn'; 'mlflow' is not a package
I thought it may be some firewall issue, so I tried on my personal system, and it's still the same error.
What could be the mistake I am doing here? or some library related issues I am facing here?
Please make sure you are installing the package at the correct PATH.
For example, if you have different versions of Python installed on your computer, installing packages can get a little tricky and thus, it's recommended to use a virtual environment to keep packages or different installations properly organised on your computer.
Since you are using a conda environment, I would suggest to use conda install mlflow with an appropriate channel instead of pip install mlflow i.e. conda install -c conda-forge mlflow.
For more details, please check https://anaconda.org/conda-forge/mlflow.

Not able to install Point Cloud Library onto python using conda

Hi all I am having a hard time installing the PCL or point cloud library onto python using the function conda install -c conda-forge pcl. I am getting all types of errors and it is not installing pcl properly and there is something about a brew? Please help
I have tried many things and even looked at the Point Cloud Library website, but I can't seem to find anything
You can try other channels instead too, sometimes it works, check here for other channels:
pcl anaconda three channels
If that still doesnot work then try in anaconda powershell pip install pcl.
I hope this will help.
As per documentation of the python package:
conda install -c conda-forge -c davidcaron pclpy
The package you installed (pcl) - it is just the binary dependencies. You need to install pclpy, which is the python wrapper.

Install module in python locally

I have a very basic question. I want to install a new module on my computer in order to use it in Python (via Spyder). When I install the package via pip everything seems to work fine. When I want to import the package in my script it says that there is no module by that name (see scrennshot below)
Any suggestions what might be the problem?
Thanks a lot :)
screenshot of this problem
You're using pip3 to install.
Try installing using pip install nibabel.
Failing that, I would refer you to the following question:
Which pip is with which python?
This is a common pitfall of using different versions of Python and pip.
I think
/Applications/Spyder.app/Contents/MacOS/python -m pip install nibabel
or
/Applications/Spyder.app/Contents/MacOS/python -m pip3 install nibabel
will solve your problem
Thanks for asking the question.
Have tried conda install
Since we are in anaconda dev env.
If you are using windows
Windows: Click Start, search, or select Anaconda Prompt from the menu
and use that terminal
please find the reference
https://docs.anaconda.com/anaconda/install/verify-install/

Why am I having errors while installing Tensorflow?

I had issues with my Tensorflow and had to re-install it. In order to ensure I do not make mistakes like I have done before, I followed Jeff Heaton tutorials (available here) for installing Tensorflow for CPU. However, on executing the command: conda env create -v -f tensorflow.yml, I get some massive error (please see details here!).
Kindly show me where I am getting it wrong.
I have tried both 2020 and 2019 versions of anaconda. Using Miniconda did not help either.
Thank you very much.
Follow the installation instructions on Anaconda's website for TensorFlow for CPU:
conda create -n tensorflow_env tensorflow
conda activate tensorflow_env
Pls, retry with anaconda
I hope it helps and to you
Download the latest version of anaconda, and start "Anaconda promt(anaconda)", then write this in Anaconda terminal
pip install tensorflow
And for test
python3
import tensorflow
If you haven't got errors, You succefully install library.

Install scikit-learn on Mac

I am new to the developer world. I tried to install Python and scikit-learn on my Mac for a new project. I installed the other packages (NumPy, pandas, etc.) which worked. However with scikit-learn I am getting an error. I used pip install sickt-learn and the installation start. For whatever reason I got the error message below.
I am using Python version 3.8.0 (global) on a OSx machine 10.14.6. What did I wrong?
Thank you for your support!
enter image description here
Maybe you should run first:
pip install Cython

Categories