AttributeError: module '01_parse' has no attribute 'path'

Hi all,

The sense2vec module uses the pathlib library, but that somehow doesn't work.

directory ~/Documents/Sense2Vec
ls: 01_parse.py all_text.txt sense2vec_data.txt
02_preprocess.py Data sense2vec-master
03_glove_build_counts.py FastText sense2vec-master.zip
04_fasttext_train_vectors.py pycache

command: :~/Documents/Sense2Vec$ python -m 01_parse.py all_text.txt ./Data en_core_web_sm

response: /usr/bin/python3: Error while finding module specification for '01_parse.py' (AttributeError: module '01_parse' has no attribute 'path')

I use python 3.6, and did a fresh install of the pathlib library

There should be a simple solution....

thanks

I don't think this is related to pathlib, which is a module built into the standard library. I think it's because you're trying to execute a Python file as a module by running python -m, which won't work. There's no need to use -m here, you just want to execute the file using python 01_parse.py.

This is embarrassing...

thanks, it works.