0

I had to parse xml and tried to install and use the library. I installed it on my datalab notebook as follows.

!pip install lxml
Requirement already satisfied: lxml in /usr/local/lib/python2.7/dist-packages

But when I try to use it, I get an error.

FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Everything is used as a datalab. Is it a problem like environment variables?

thanks.

Update

Is it ok to show another sample? (in datalab notebook)

!pip install scikit-learn==0.18.1
Requirement already satisfied: scikit-learn==0.18.1 in /usr/local/lib/python2.7/dist-packages

import sklearn
print ("scikit-learn version: {}". format(sklearn.__version__))
scikit-learn version: 0.17.1

print(sklearn.__path__)
['/usr/local/lib/python2.7/dist-packages/sklearn']

It probably seems to refer to the default environment variable without reading the installed path. What do you think?

solution

Restart Service has been fixed. thanks @yelsayed @Ethan_kim

Community
  • 1
  • 1
Jay
  • 397
  • 1
  • 5
  • 19
  • It's working fine for me. What's the code causing the error message? – yelsayed Jul 18 '17 at 21:27
  • @yelsayed It's hard to show the code and I have another sample in the text, can you take a look? – Jay Jul 18 '17 at 23:17
  • Looks to me like you have two versions of the pip package installed? When you install, use the upgrade option: `!pip install -U `, this way you can explicitly tell python to use a specific version. Does this fix the issue? – yelsayed Jul 19 '17 at 07:19
  • The same is true for update packages using the options you have given.(`!pip install -U sklearn`) I do not know why the old version is still used because the path of the updated package is the same as the imported path. – Jay Jul 19 '17 at 22:54

0 Answers0