Group Group Group Group Group Group Group Group Group

Chapter 4 turicreate can not import in jupyter notebook

#1

Hi and happy new year,

I am trying to import turicreate in jupyter notebook but I have the following error:


ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import turicreate as tc

ModuleNotFoundError: No module named ‘turicreate’

I have followed the instructions and I have turicreate installed, If I do conda list I can see it:

setuptools 40.6.3 py36_0
six 1.12.0 py36_0
six 1.10.0
sqlite 3.26.0 ha441bb4_0
terminado 0.8.1 py36_1
testpath 0.4.2 py36_0
tk 8.6.8 ha441bb4_0
toolz 0.9.0 py36_0
tornado 5.1.1 py36h1de35cc_0
traitlets 4.3.2 py36h65bd3ce_0
turicreate 5.0
urllib3 1.22
wcwidth 0.1.7 py36h8c6ec74_0
webencodings 0.5.1 py36_1
wheel 0.32.3 py36_0

If I do conda list coremltools I see also:

packages in environment at /anaconda3/envs/turienv:

Name Version Build Channel

coremltools 2.0b1

But when I open jupyter notebook following the instruction of the manual the import does not work, it seems like jupyter can not see the library, I access from the turienv enviroment

How can I solve this issue? I have searched in internet and not found a solution.

Thanks in advance,

Felix.

#2

@audrey @hollance Can you please help with this when you get a chance? Thank you - much appreciated! :]

#3

I have also tried importing the yaml files, it seems that works well but still have the same problem.

#4

hi Felix @faabalia : how are you starting jupyter? from anaconda navigator? or from the terminal command line?

#5

I have tried from both and I have the same problem.

#6

are you in the turienv environment? in navigator, the pulldown menu next to Applications on, and in Terminal, your prompt starts with [turienv]

#7

Yes I am in turienv in Terminal and Anaconda Navigator.

Anaconda navigator:

And Terminal:

Thanks in advance,

Felix.

#8

If I do conda list in terminal I see turicreate:

#9

I’m stumped! restart your Mac?

or, in your notebook, try this command:

!pip install turicreate==5.0

The “!” escapes to the shell

#10

I have restarted mac and not working, I have executed !pip install turicreate==5.0 and not working too. I don’t know why but it seems jupyter notebook can not access turicreate module, is there anyway to uninstall jupyter notebook and install again from scratch?

I see that if I execute from terminal python and when it shows the prompt of python >> if I do import turicreate as tc then it imports correct turicreate, so I think that must have a problem with jupyter notebook installation, but I do not know how to solve it. It is quite frustating.

Thanks in advance.

#11

try uninstalling anaconda: https://docs.anaconda.com/anaconda/install/uninstall/

#12

Hi Audrey,

I think that I have got it and why it is happening.

From Terminal if I execute:
python

import sys
sys.executable

I got: ‘/anaconda3/envs/turienv/bin/python’

If I did the same from jupyter notebook (except python): ‘/anaconda3/envs/python37/bin/python3’

In an url of internet (https://github.com/jupyter/notebook/issues/2563), they said that if I execute: sudo -H pip2 install jupyter it worked, I tried it and it has imported well then it worked from terminal and from Anaconda Navigator too.

Thanks in advance.

1 Like
#13

Hi Audrey,

Other problem, I am trying to download the images from the url that comes in md file: https://www.dropbox.com/s/6iv6s60mpjaajtr/snacks.zip?dl=0 and it gives me a 404 error saying that the file is not there.

#14

oops, that’s a note to the tech editor, leftover from when we were writing

the data set link is in the previous chapter, p 83 of the pdf:

https://wolverine.raywenderlich.com/books/mlt/snacks.zip

#15

Ok thank you very much. Happy new Year :slight_smile:

1 Like