0

a newbie to python. I have the following code on pycharm

import requests
import gzip
import shutil
import os
import Libraries

from Libraries import Dictionaries as dicts

And after running it I get the following error

ModuleNotFoundError: No module named 'Libraries

And when I try to install the Libraries package, it fails to install it. Any suggestions? ps: I get the same error both on PyCharm and on Jupyter Notebook

  • What is the `libraries` package? Have you used it before? If so, how? – Axe319 Feb 03 '21 at 16:04
  • I have not used it before and I dont know what that is. This code is something I got as an exercise. – Maria Fernandez Feb 03 '21 at 16:24
  • Welcome to Stack Overflow. The recommended practice for this is first creating a `venv`, you can see how to [here in the PyCharm documentation](https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html). You can install Jupyter Notebooks using the graphical interface in step 3 (it's like `pip install`) of the previous example that is probably the easiest choice to begin. Afterwards the imports should work, if not check [this thread](https://stackoverflow.com/a/710603/). After you have tried this, if it still doesn't work edit the question to include more info. – bad_coder Feb 04 '21 at 02:05

1 Answers1

0

Remove the lines

import Libraries

from Libraries import Dictionaries as dicts

and add the line:

import dictionaries as dicts

Assuming dictionaries is installed via pip or similar.

BloodSexMagik
  • 398
  • 1
  • 3
  • 14