ModuleNotFoundError: No module named 'mephisto.core' - python

I'm using the latest version of Mephisto on macOS Catalina. I am trying to run ParlAI, and specifically the acute_eval task.
According to the Instructions of both Mephisto and AcuteEVAL, I should be able to execute run.py and get the task running. However, I get this error as I run it, using this command:
python run.py --pairings_filepath=example/pairings.jsonl
And this is the error:
Traceback (most recent call last):
File "run.py", line 17, in <module>
from parlai.crowdsourcing.tasks.acute_eval.acute_eval_blueprint import BLUEPRINT_TYPE
File "/Users/moli/opt/anaconda3/envs/py36/lib/python3.6/site-packages/parlai/crowdsourcing/tasks/acute_eval/acute_eval_blueprint.py", line 12, in <module>
from mephisto.core.registry import register_mephisto_abstraction
ModuleNotFoundError: No module named 'mephisto.core'

The ParlAI installation instructions on github state that Python 3.7 or higher is required, however it appears that you are using Python 3.6. This is likely the cause of the issue, and the program should work if you upgrade your Python version.

Related

Why can't I install pyler module?

I get an error while I try to import the pyler module in python. I have uninstalled and then installed the module many times, and also with the .whl file, but still only the info file is generated.
import pyler
When I write this, I get
Traceback (most recent call last): File "c:\Users\USER\Documents\Tanav\VsCode\tut1\Python proj\smth.py", line 1, in <module> import pyler ModuleNotFoundError: No module named 'pyler'
I use python version 3.8.5 on windows 10 64-bit machine.
Please help

Errors when running s3cmd installed from brew

A few weeks ago I had brew update various casks and now I can't run s3cmd. I get the following errors:
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "/usr/local/Cellar/s3cmd/2.0.2_3/libexec/bin/../lib/python3.8/site.py", line 703, in <module>
main()
File "/usr/local/Cellar/s3cmd/2.0.2_3/libexec/bin/../lib/python3.8/site.py", line 694, in main
execsitecustomize()
File "/usr/local/Cellar/s3cmd/2.0.2_3/libexec/bin/../lib/python3.8/site.py", line 548, in execsitecustomize
import sitecustomize
File "/usr/local/lib/python2.7/site-packages/sitecustomize.py", line 4, in <module>
import re
File "/usr/local/Cellar/s3cmd/2.0.2_3/libexec/lib/python3.8/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Based on the errors, I assumed this is python 3 issue. The Mac comes with python 2.7 and I use a lot of 2.7 python scripts so I don't want to make a system wide change.
Based on some research, it doesn't seem that s3cmd requires python3.
I could be very wrong about it needing python3 and it's some other issue. The rest of my python code runs just fine so it's not a fundamental issues with python and seems to only be s3cmd.
Everything in brew seems to be up to date and I've uninstalled and installed s3cmd miltiple times trying to fix this.
I am running OS X 10.14.6
Did you try that?
Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?
the two top answers were to:
pip uninstall -y enum34
OR
unset PYTHONPATH

No module named Setup, import error

I'm trying to run through the Guestbook tutorial on the google appengine website. I have Python 2.7.13 and Python 3.6 installed. However when I'm trying to run the program locally via dev_appserver.py ./ command I'm getting this error.
Traceback (most recent call last):
File "C:\Users\sameer\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserver.py", line 11, in <module>
import bootstrapping.bootstrapping as bootstrapping
File "C:\Users\sameer\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\bootstrapping\bootstrapping.py", line 9, in <module>
import setup
ImportError: No module named 'setup'
I've tried installing and updating setuptools but it doesn't seem to work.

How to install WebIDL Ubuntu

Hello I am trying to build a library using emscripten.
I am encountering an error
python /usr/share/emscripten/tools/webidl_binder.py liquidfun.idl liquidfun_glue
Traceback (most recent call last):
File "/usr/share/emscripten/tools/webidl_binder.py", line 15, in <module>
import WebIDL
ImportError: No module named WebIDL
Makefile:87: recipe for target 'liquidfun_glue.cpp' failed
make: *** [liquidfun_glue.cpp] Error 1
If the module WebIDL cannot be found how do I install it?
I tried npm-instll webidl but that just created a node-modules folder with it in the make directory. Where should I install it to if i want it to work?
EDIT: I've been doing some reading and it seems to be a python thing. I still don't know how to install WebIDL python module though.

Python AttributeError: 'module' object has no attribute 'Goslate'

I am trying Goslate: Free Google Translate API. I installed goslate using sudo pip install goslate
I wrote a simple program and executed it using python getbn.py command in my terminal.
Here is the code inside getbn.py:
import goslate
gs = goslate.Goslate()
print(gs.translate('hello world', 'bn'))
After executing the command python getbn.py I got the following errors:
Traceback (most recent call last):
File "getbn.py", line 1, in <module>
import goslate
File "/home/ubuntu/Desktop/goslate.py", line 2, in <module>
# -*- coding: utf-8 -*-
AttributeError: 'module' object has no attribute 'Goslate'
Then I tried to run the program by executing python3 getbn.pycommand, and I found the following errors:
Traceback (most recent call last):
File "getbn.py", line 1, in <module>
import goslate
ImportError: bad magic number in 'goslate': b'\x03\xf3\r\n'
How do I fix it? And why are there two different types of erros?
You have a file called goslate.py in your Desktop folder
File "/home/ubuntu/Desktop/goslate.py", line 2, in <module>
^^^^^^^^^^^^^^^^^^^^
This is not the module you installed using pip and it's getting in the way of the import.
You May have simple installed goslate, but you may be using different virtual env. Try to switch to that virtual env, and then run again.

Categories