When trying to setup environment to run django-nonrel and mongoengine, I keep getting following error. The project runs fine on different computer where it was developed.
Traceback (most recent call last):
enter code hereFile "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/test/Documents/personal-proj/groc/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/home/test/Documents/personal-proj/groc/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
ImportError: No module named django.mongo_auth
Try running:
pip install django-mongo-auth
Since you are setting it up in a new environment you will need to make sure you have all the dependencies installed. If you have an up to date requirements.txt file, you can also run:
pip install -r path/to/requirements.txt
And you can view what packages you are currently using by using:
pip freeze
Related
When I run dev_appserver.py on google-cloud-sdk, I get ImportError: No module named py27_urlquote.
Traceback (most recent call last):
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 109, in <module>
_run_file(__file__, globals())
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 103, in _run_file
_execfile(_PATHS.script_file(script_name), globals_)
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in _execfile
execfile(fn, scope)
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 44, in <module>
from google.appengine.tools.devappserver2 import dispatcher
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 43, in <module>
from google.appengine.tools.devappserver2 import module
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 39, in <module>
import py27_urlquote
ImportError: No module named py27_urlquote
I have tried the following:
Reinstall Cloud SDK
Find out about the py27_urlquote module (I couldn't find any such information ...)
Change the version of CLOUDSDK_PYTHON to 2.7 or 3.8 and execute
Right now this is a public issue and is currently being addressed by our Google Engineering Team. A workaround was provided for you to run your local development server:
Install pip for Python 2
sudo apt update
sudo apt install python-pip
Install urlquote instead of py27_urlquote
pip install urlquote
Modify module.py located on your local directory from the error message
/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py
Replace py27_urlquote to urlquote. There are 3 lines of code that uses py27_urlquote. Specifically lines 39, 833, and 836.
You can check this public tracker similar to your issue for more information and updates.
I just encountered this problem too on the SDK version 359.0.0
Instead of updating the SDK files manually, I opted for downgrading to a previous version.
I found that version 357.0.0 works fine.
To downgrade, run the following command:
gcloud components update --version 357.0.0
run rn50 scripts in NVIDIA/DeepLearningExamples, as
./rn50_partial.sh
get error like this:
Traceback (most recent call last):
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/mnasnet/training/FP32/../../../launch.py", line 7, in <module>
from main import main, add_parser_arguments, available_models
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/main.py", line 49, in <module>
from image_classification.dataloaders import *
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/image_classification/dataloaders.py", line 79, in <module>
class HybridTrainPipe(Pipeline):
NameError: name 'Pipeline' is not defined
ok, I've solved this, cause NVIDIA does not classify the specific installation, actually, it does not have to install from scratch, if you use pip install, just check which version NVIDIA docker use and download this specific version, pip install, and everything will be ok.
I'm trying to execute ansible in my system. I guess I messed up something and unable to run ansible. When I run ansible --version, I see the following error:
krishnapatamset:bin krishna.patamsetti$ ansible --version
[WARNING]: log file at /var/log/ansible/ansible.log is not writeable and we cannot create it, aborting
ERROR! Unexpected Exception: No module named markupsafe
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible", line 80, in <module>
from ansible.cli.adhoc import AdHocCLI as mycli
File "/usr/local/lib/python2.7/site-packages/ansible/cli/adhoc.py", line 28, in <module>
from ansible.executor.task_queue_manager import TaskQueueManager
File "/usr/local/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 29, in <module>
from ansible.executor.play_iterator import PlayIterator
File "/usr/local/lib/python2.7/site-packages/ansible/executor/play_iterator.py", line 30, in <module>
from ansible.playbook.block import Block
File "/usr/local/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 27, in <module>
from ansible.playbook.play import Play
File "/usr/local/lib/python2.7/site-packages/ansible/playbook/play.py", line 27, in <module>
from ansible.playbook.base import Base
File "/usr/local/lib/python2.7/site-packages/ansible/playbook/base.py", line 29, in <module>
from jinja2.exceptions import UndefinedError
File "/usr/local/lib/python2.7/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 13, in <module>
from jinja2 import nodes
File "/usr/local/lib/python2.7/site-packages/jinja2/nodes.py", line 19, in <module>
from jinja2.utils import Markup
File "/usr/local/lib/python2.7/site-packages/jinja2/utils.py", line 531, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
Can anyone please help me with this situation. Thanks in advance
I even tried pip install markupsafe but still I am unable to get ansible working
Ansible is based on python and there is a python module that's missing called markupsafe
install it via pip, you may need to escalate privileges
pip2 install -I markupsafe
pip2 for python 2.x
-I to ignore and reinstall package if it's already installed
I uninstalled pip and installed it again.
brew uninstall pip
brew doctor
brew install pip
I just installed pip with ubuntu onto my laptop. Whenever I try to use pip in the terminal, I keep getting this error:
lopuj#lopuj-Dell-System-XPS-L502X:~$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 357, in load_entry_point
def get_entry_info(dist, group, name):
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 2394, in load_entry_point
break
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 2108, in load
name = some.module:some.attr [extra1,extra2]
ImportError: No module named 'pip'
lopuj#lopuj-Dell-System-XPS-L502X:~$ ^C
lopuj#lopuj-Dell-System-XPS-L502X:~$
How can I stop this from happening so i can just type in commands like 'pip install Django==1.7.1'?
Your referencing
usr/local
but pip is installed at
usr/lib
Check your installation. I would reinstall using esay_install and then open/close terminal.
I installed again my openerp project in another machine and added pydev to eclipse then when i going to run openerp-server file below error has come.seems something missing with installing procedure.
please help me to sort out this issue
pydev debugger: starting
Traceback (most recent call last):
File "/home/priyan/Softwares/eclipse/dropins/PyDev 2.7.3/plugins/org.python.pydev_2.7.3.2013031601/pysrc/pydevd.py", line 1397, in <module>
debugger.run(setup['file'], None, None)
File "/home/priyan/Softwares/eclipse/dropins/PyDev 2.7.3/plugins/org.python.pydev_2.7.3.2013031601/pysrc/pydevd.py", line 1090, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "/home/priyan/Softwares/openerp-7.0/openerp-server.py", line 2, in <module>
import openerp
File "/home/priyan/Softwares/openerp-7.0/openerp/__init__.py", line 39, in <module>
import addons
File "/home/priyan/Softwares/openerp-7.0/openerp/addons/__init__.py", line 38, in <module>
from openerp.modules import get_module_resource, get_module_path
File "/home/priyan/Softwares/openerp-7.0/openerp/modules/__init__.py", line 27, in <module>
from . import db, graph, loading, migration, module, registry
File "/home/priyan/Softwares/openerp-7.0/openerp/modules/graph.py", line 32, in <module>
import openerp.osv as osv
File "/home/priyan/Softwares/openerp-7.0/openerp/osv/__init__.py", line 22, in <module>
import osv
File "/home/priyan/Softwares/openerp-7.0/openerp/osv/osv.py", line 28, in <module>
from psycopg2 import IntegrityError, OperationalError, errorcodes
ImportError: No module named psycopg2
when i use apt get for install it via terminal then error says as below
root#priyan-pc:~# sudo apt-get install python-psycopg2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-psycopg2
root#priyan-pc:~#
It seems psycopg2 is not installed in your system. First install psycopg2 and then run OpenERP server.
Command to install psycopg2:
sudo apt-get install python-psycopg2
or
sudo easy_install psycopg2
or
You can download latest package (tar.gz) from Download pysycopg2. After that extract it, open terminal and run setup.py file.
sudo python setup.py install