Python Forum
no module named finbert found
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
no module named finbert found
#1
The following code generates a error:

[/code]
from pathlib import Path
import sys
sys.path.append('..')
import argparse
import shutil
import os
import logging
from textblob import TextBlob

from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
from pytorch_pretrained_bert.modeling import BertForSequenceClassification
from pytorch_pretrained_bert.tokenization import BertTokenizer
from pytorch_pretrained_bert.optimization import *

from finbert.finbert import *
import finbert.utils as tools
from pprint import pprint
from sklearn.metrics import classification_report
%load_ext autoreload
%autoreload 2

project_dir = Path.cwd().parent
pd.set_option('max_colwidth', -1)
[code]

[/error]
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-5-6e2ffec00ab6> in <module>
13 from pytorch_pretrained_bert.optimization import *
14
---> 15 from finbert.finbert import *
16 import finbert.utils as tools
17 from pprint import pprint

ModuleNotFoundError: No module named 'finbert'
[error]

I tried to install finbert embedding it installed, but no luck. I even tried to install a finbert module.

I have been googling all options, as outlined above, but one seem to work.

How do I fix this error? I created an environment with

conda env create -f environment.yml

I have not used this command much. I generally use a reqiirements.txt file.

I am not sure of the difference.

Any help appreciated. I am using a docker jupyter notebook tensorflow image, I thought was the easiest way.

My os in Windows 10 pro.

But it keeps throwing this error.

Any help appreciated.

Respectfully,

ErnestTBass
Reply


Messages In This Thread
no module named finbert found - by ErnestTBass - Nov-30-2020, 07:33 PM
RE: no module named finbert found - by ErnestTBass - Nov-30-2020, 08:05 PM
RE: no module named finbert found - by bowlofred - Nov-30-2020, 08:55 PM
RE: no module named finbert found - by ErnestTBass - Nov-30-2020, 09:18 PM
RE: no module named finbert found - by andrianas - Dec-05-2020, 06:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  no module named 'docx' when importing docx MaartenRo 1 958 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 23,996 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,688 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,503 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  pyside6 module not found ForeverNoob 4 1,476 Aug-18-2023, 04:36 PM
Last Post: snippsat
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,586 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,385 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 1,066 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  Help with pyinstaller "No module named" korenron 9 9,325 Jun-15-2023, 12:20 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,041 May-15-2023, 02:38 PM
Last Post: tonynapoli2309

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020