After I upgraded AML SDK within conda virtual environment I have started getting error in my MacOS as follows:
print(azureml.core.version)
1.0.76
from azureml.train.automl import AutoMLConfig
ImportError: cannot import name 'AutoMLConfig'
Could you please follow the below steps.
-
Completely uninstall conda and reinstall.
Build the azure_automl env using automl_setup_mac.
run from azureml.train.automl import AutoMLConfig to work.
Please follow the below document for automl setup using local conda environment.
https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml/automated-machine-learning#localconda
Related
I have a .yml that installs all the necessary Azure ML packages.
Upon creating the environment with the YML, I test to make sure I can import the packages, and I can.
But when I open the Jupyter notebook I will be using and import the necessary packages, one is not found.
from azureml.train.automl import AutoMLConfig
ModuleNotFoundError: No module named 'azureml.train.automl.automlconfig'
But When I import it in the command prompt, it successfully imports
It seems like this is an issue with VS code, has anyone else encountered this?
I tried reproducing the issue while importing AutoMLConfig in VSCode as below:
Followed the below steps to fix it by installing its related Python packages.
Activate the virtual environment from below command
python -m venv .venv
.venv\Scripts\activate
Then install pip install azureml and “pip install azureml-core”
Pip install azureml-train
Pip install azureml-train-automl
Also, we have a Microsoft documentation where we have all the sub packages of azureml.
I have anaconda python 3.7 installed on my system. I am creating a Django project called learning log in a virtual environment(active at the time when the problem appeared) in G drive on my computer. I have defined and migrated the entry model but when I try to register entry with the admin site through file admin.py in the project folder with the following code ...
from django.contrib import admin
from models import Topic
# Register your models here
admin.site.register(Topic)
... and try to run it in my spyder editor it shows:
ModuleNotFoundError: No module named 'django'
Have you tried re-installing it with
pip install django
in your virtualenv?
Instead of pip installing, you might have to conda install it.
conda install -c anaconda django
I installed miniconda and just created a conda environment:
conda create -n my_env python=3.5 anaconda
I am trying to:
import cvlib
But I am getting the error:
ImportError: No module named cvlib
So I have tried to install using:
pip3 install cvlib
This seemed to work successfully, but then when I try to import cvlib I am still getting the ImportError: No module named cvlib error (I have retarted my terminal after the installation).
Is this a problem with my PYTHONPATH not containing the path to the directory that now contains cvlib? If so, how do I find where cvlib is saved so that I can add the path?
Check if the library is in your python directory. Otherwise, make a repl.it account, and install cvlib, and check the functions or the lib name. Maybe try searching a more advanced installation of cvlib.
it might have occurred due to the version of python you installed or due to the directory, you installed.
try uninstalling the current version of python and try installing an older version of python and install it in the directory as shown below:
C:\Users\Rajish\AppData\Local\Programs\Python\Python39
also, select add the path to environment variables while installing
and after that install cvlib and all other required modules and packages
it worked for me.
Importing pysftp into Jupyter Notebook
While importing pysftp into Jupyter Notebook, ModuleNotFoundError is shown.
Checking import of pysftp on device?
I have verified the package installation with
pip list and pip show pysftp
Had imported pysftp package(v0.2.9) and installed it in the below location
C:\users\xxxxxx\appdata\roaming\python\python37\site-packages
Check : Package installed OKAY
Check about package correct path linking from cmd prompt?
I'm using Python 3.7.0 on a WIN machine, verifyed the site package location using
import sys and sys.path
image confirms linking of PATH to correct location and the package is successfully executed when python is run through cmd prompt
Check : Path link and cmd run OKAY
Now could anyone help me solve why the package import in Jupyter Notebook is throwing an error?
Thank you
Edit 1: Check for different environment installed? added based on one of the answer
Only one environment is present in the machine
I got the same. I solved by installing directly within Jupyter using the following command:
import sys
!{sys.executable} -m pip install dice-ml
Are you running the notebook through a virtual environment?
You can try running the same commands as you did on CMD by preceding it with ! as follows:
!pip list
Ideally this should list the same contents as shown in CMD. However the results may be different if you are running Jupyter notebook in a virtual environment. If you are unable to see pysftp, you need to install it within the virtual environment. This can be done from within your notebook as:
!pip install pysftp
I get this error while running a keras code, so keras is trying to import
from PIL import Image as pil_image
I have installed pillow, also I'm able to successfully import this in my python terminal but in jupyter notebook it gives import error.
env - ubuntu 16 on aws ec2 instance, I'm using aws deep learning ami for ubuntu
pillow comes with conda, I also tried to install using pip
but again I can import it in python/ipython shell but not in jupyter notebook.
I had opencv installed. But I just installed pillow(keeping opencv) and it worked for me.
So, It seems pillow/pil was included in jesper or opencv package on jupyter notebook, so I uninstalled both jesper and opencv in package portal of notebook and installed pillow. now everything is running fine.