fbdesignpro / sweetviz

Visualize and compare datasets, target values and associations, with one line of code.
MIT License
2.9k stars 273 forks source link

Import library without installing it #159

Closed ankita2020 closed 11 months ago

ankita2020 commented 11 months ago

I downloaded the source code from sweetviz's GitHub and my project directory was like this -- my_project/ ├── sweetviz/ │ ├── init.py │ ├── ... ├── my_script.py

The issue is that when I import this library( in my_script.py and run the file) without installing it gives importlib.metadata.PackageNotFoundError: sweetviz on the terminal and gives PackageNotFoundError: sweetviz on jupyter notebook . I also did -

import sys sys.path.append("D:\Download\my_project\sweetviz")

So it is possible to import this library without installing it? If yes then tell me what would I have to do and whatever I did was correct or wrong. Please solve this query ASAP.

Thanks in advance...

fbdesignpro commented 11 months ago

@ankita2020 apologies for the slight delay in answering. I used your code and it should work, but you need to NOT include "sweetviz" in the path, as it is what the import command is looking for. Here is what I ran in Jupyter: (You may also change your \ to /, as it might mess the string up unless it is a raw string, although it seemed to work without any changes) image