Failed to load straight.plugin in Python 2.7 - python

I am trying to run a python script which is seems to be dependent on a module called straight.plugin, which it fails to recognise.
(antismash)[username#glenn antismash]$ python run_antismash.py
Traceback (most recent call last):
File "run_antismash.py", line 32, in <module>
import straight.plugin
File "/c3se/users/username/Glenn/virtualenvs/antismash/lib/python2.7/site-packages/straight/plugin/__init__.py", line 1, in <module>
from straight.plugin import loaders
File "/c3se/users/username/Glenn/virtualenvs/antismash/lib/python2.7/site-packages/straight/plugin/loaders.py", line 9, in <module>
from straight.plugin.manager import PluginManager
ImportError: No module named manager
When I try to install straight.plugin python tells me that it is already installed.
(antismash)[username#glenn antismash]$ pip instal
l straight.plugin
Requirement already satisfied (use --upgrade to upgrade): straight.plugin in /c3se/users/username/Glenn/virtualenvs/antismash/lib/python2.7/site-packages
Cleaning up...
Can somebody help me on what to do to run this python script?
I am running Python 2.7.6 on Linux distribution CentOS 6.6

Looks like the manager module isnt in the PyPI Package and is a known issue https://github.com/ironfroggy/straight.plugin/issues/17
Installing this version:
pip install straight.plugin==1.4.0-post-1
solves the problem for me:
In [1]: from straight.plugin.manager import PluginManager
In [2]:

Related

Getting "ImportError: No module named parse" while trying to pip install multiparse for Python 2.7

I am trying to install multipart and simply running the command
pip install multipart
But I am getting and error
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cn/h4g68yd17jq5fx0cqf0fss180000gn/T/pip-install-w_zyum/multipart/setup.py", line 7, in <module>
from multipart import __version__, __author__, __license__, __doc__
File "multipart.py", line 22, in <module>
from urllib.parse import parse_qs
ImportError: No module named parse
I have checked Python and PIP versions. I have Python 2.7 and 3.7 installed on the system. Doing -
pip3 install multipart
Returns -
Requirement already satisfied: multipart in /usr/local/lib/python3.7/site-packages (0.2)
Edit - It is for a legacy work project which is in Python 2.7 and can't be updated to 3x for now.
multipart 0.2 is available for python 3 only.
for python 2.7 you can install multipart version 0.1 by
pip install multipart==0.1

pip install asteval fails on six dependency

If I create a clean virtualenv, upgrade my pip version to 9.0.1 (most recent), and try:
$ pip install asteval
Collecting asteval
Downloading asteval-0.9.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nnWnaR/asteval/setup.py", line 3, in <module>
import asteval
File "asteval/__init__.py", line 20, in <module>
from .asteval import Interpreter
File "asteval/asteval.py", line 18, in <module>
import six
ImportError: No module named six
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nnWnaR/asteval/
Maybe I'm missing something, I thought pip should handle the dependencies? I thought it used to.
The bypass is to separately pip install six, then asteval will install. But I want to require asteval as an import requirement in my code, and I don't want to have to trace dependencies it might have and list those as requirements.
asteval is making a common mistake: importing itself into its setup.py. You should file a bug against the project, asking them to stop doing that.

I'm having troubles getting pybrain working through anaconda

Here is my problem:
After I managed to install anaconda (having python 3.4), I apparently managed to install pybrain too. But when i use 'import pybrain' from anaconda or from the terminal too I get this error:
>>> import pybrain
Traceback (most recent call last):
File "<ipython-input-2-0fb7233d2a8c>", line 1, in <module>
import pybrain
File "//anaconda/lib/python3.4/site-packages/PyBrain-0.3-py3.4.egg/pybrain/__init__.py", line 1, in <module>
from structure.__init__ import *
ImportError: No module named 'structure'
Simply running sudo pip3 install git+https://github.com/pybrain/pybrain.git worked for me after having the same issue.
The version up on PyPi isn't Python 3 compatible.
Installing the latest commit directly using pip3 should take care of your old package (from PyPi) as well.

Having trouble installing buildslave on Windows 7

I finally got pip install buildbot-slave to work on Win7 (thanks to another answer on this site), and now when I attempt to create a build slave via:
buildslave create-slave slavefolder blah.blah.com:9989 buildslave password
It kicks back the following error:
Traceback (most recent call last):
File "C:\Python27\Scripts\buildslave", line 3, in <module>
from buildslave.scripts import runner
File "C:\Python27\lib\site-packages\buildslave\scripts\runner.py", line 22, in <module>
from twisted.python import reflect
File "C:\Python27\lib\site-packages\twisted\__init__.py", line 53, in <module>
_checkRequirements()
File "C:\Python27\lib\site-packages\twisted\__init__.py", line 37, in _checkRequirements
raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.
I've got it all installed here is my pip freeze:
Twisted==14.0.0
argparse==1.2.1
buildbot-slave==0.8.9
stevedore==0.15
virtualenv==1.9.1
virtualenv-clone==0.2.5
virtualenvwrapper==4.3.1
virtualenvwrapper-win==1.1.5
zope.interface==4.1.1
Any recommendations would be greatly appreciated.
Try to uninstall zope.interface and reinstall the version 3.6.0 using the command
pip uninstall zope.interface
pip install zope.interface==3.6.0
Hope this helps.

unable to import evernote.api.client (evernte sdk)

i'm trying to get started with evernote SDK , i'm using ubuntu 13.04
i installed the SDK via :
pip install evernote
but when i want to test it using :
python -c 'from evernote.api.client import EvernoteClient'
i got this :
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named api.client
What is the problem ?
EDIT : pip install evernote works fine i guess , it gives me this :
Requirement already satisfied (use --upgrade to upgrade): evernote in /usr/local/lib/python2.7/dist-packages/evernote-1.24.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): oauth2 in /usr/lib/python2.7/dist-packages (from evernote)
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/lib/python2.7/dist-packages (from oauth2->evernote)
Cleaning up...
here is the turorial : http://dev.evernote.com/start/guides/python.php
This is pretty old already, but I bet more people will hit it, so I'll put the answer here. It seems to be a surprisingly common issue that doesn't have an answer anywhere.
Note how the error complains about api.client but not evernote.
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named api.client
Most likely, the problem is that OP has a script in his path called evernote.py, which I guess is a common name people use to name their first evernote script. Rename the script to something less obvious and that should do the trick.
Looks like
pip install evernote don't do what it is suppose to do:
cat /etc/SuSE-release
openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
pip install evernote
Downloading/unpacking evernote
Downloading evernote-1.24.0.macosx-10.8-x86_64.tar.gz (326kB): 326kB downloaded
Running setup.py egg_info for package evernote
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/evernote/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/evernote/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/evernote
Storing complete log in /root/.pip/pip.log
You can fix that with:
pip -v install evernote==1.23.2
and everything works just fine!
Could you check the version of Evernote SDK for Python with:
pip freeze
If import evernote works but from evernote.api.client import EvernoteClient doesn't, you might happen to use 1.23.0 version or older since EvernoteClient class was introduced in 1.23.1.
Also please check your site-packages directory to make sure any older version is not loaded.

Categories

Resources