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.
Related
I installed "contractions" package through pycharm. However when I compile the following code :
import contractions
It gives me error :
Traceback (most recent call last):
File "/home/wayne/PycharmProjects/sentiment-analysis/venv/expand_contractions.py", line 1, in <module>
import contractions
File "/home/wayne/PycharmProjects/sentiment-analysis/venv/lib/python3.7/site-packages/contractions/__init__.py", line 2, in <module>
from textsearch import TextSearch
File "/home/wayne/PycharmProjects/sentiment-analysis/venv/lib/python3.7/site-packages/textsearch/__init__.py", line 4, in <module>
import ahocorasick
ModuleNotFoundError: No module named 'ahocorasick'
However it works when I install "contractions" package through ubuntu terminal and run the code through terminal.
But still it's not working on PyCharm.
Also "pip install ahocorasick" gives error :
ERROR: No matching distribution found for ahocorasick
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.
I am trying to run a simple python script to connect to my local postgresl db. I am on a mac and after doing a pip install psycopg2 and pip install psycopg2-binary I still get a module not found error in my simple script.
Python 3.8.1
Error:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import psycopg2
ModuleNotFoundError: No module named 'psycopg2'
test.py:
import psycopg2
I have a Python script that I am trying to run in Linux via a bash script called ./launch.sh. When I launch the code I get the following error returned.
[user#localhost mktdata.out]$ ./launch.sh
[user#localhost mktdata.out]$ Traceback (most recent call last):
File "strats/merlin.py", line 10, in <module>
File "strats/merlin/mktdata.py", line 11, in <module>
File "strats/dao/utils/itertools.py", line 1, in <module>
ModuleNotFoundError: No module named 'future'
Line 1 in the Python script itertools.py line 1 that the error is referring to is:
from future.moves.itertools import zip_longest
Is there a package that I need to install in order for this code to work?
You need to import future like this:
from __future__ import *
In the event that fails, use pip to install it like this (Use sudo for MAC):
pip install future
Here is more on installing future.
I have tried all the import methods and upgrading the libraries but still I'm unable to get over this error. I have downloaded and installed all the nltk and corpus data programmatically and it is working in the python shell but i'm getting error.
Traceback (most recent call last):
File "spark.py", line 7, in <module>
from textblob_aptagger import PerceptronTagger
File "/usr/local/lib/python2.7/dist-packages/textblob_aptagger/__init__.py", line 8, in <module>
from textblob_aptagger.taggers import PerceptronTagger
File "/usr/local/lib/python2.7/dist-packages/textblob_aptagger/taggers.py", line 10, in <module>
from textblob.packages import nltk
ImportError: No module named packages
Here's a pastebin to my code and imports..
Same error has been posted on github here. Use this instead to install textblob:
$ pip install -U git+https://github.com/sloria/textblob-aptagger.git#dev
Also, you should change from text.blob import TextBlob as tbto from textblob...
Works for me..