Error installing Dynamic-DynamoDB using pip - python

I am completely newbie to Python and just trying to install Dynamic-DynamoDB python package on RHEL5 Linux for very first time. I didn't have pip on my system so I followed instructions as in asnwer to What is the official "preferred" way to install pip and virtualenv systemwide?
Now when I try to install dynamic-dynamoDB as mentioned in installing instructions, it gives me error.
pip install dynamic-dynamodb
Error
Traceback (most recent call last):
File "/usr/bin//pip", line 8, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 2381, in load_entry_point
return ep.load()
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 2087, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.4/site-packages/pip/__init__.py", line 11, in ?
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.4/site-packages/pip/vcs/mercurial.py", line 9, in ?
from pip.download import path_to_url2
File "/usr/lib/python2.4/site-packages/pip/download.py", line 3, in ?
import hashlib
ImportError: No module named hashlib
Any suggestions on what am I missing here?

I'm the author of Dynamic-DynamoDB. Sorry for a late answer, I wanted to answer anyway in case anyone else has the same problem later on.
The reason is that the Python version is too old. Dynamic DynamoDB supports Python >2.6.

Related

running pyinstaller after Anaconda install results in ImportError: no Module named 'pefile'

I did conda install -c acellera pyinstaller=3.2.3 as per Anaconda's website and it looks like it installed correctly but I get the following if I try to run it via cmd:
C:\Users\Cornelis Dirk Haupt\PycharmProjects\Mesoscale-Brain-Explorer\src>pyinstaller
Traceback (most recent call last):
File "C:\Anaconda3\Scripts\pyinstaller-script.py", line 9, in <module>
load_entry_point('PyInstaller==3.3.dev0+g8756735', 'console_scripts', 'pyinstaller')()
File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 542, in load_entry_point
File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2569, in load_entry_point
File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2229, in load
File "C:\Anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 2235, in resolve
File "C:\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 21, in <module>
import PyInstaller.building.build_main
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 34, in <module>
from .api import PYZ, EXE, COLLECT, MERGE
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\api.py", line 38, in <module>
from PyInstaller.utils.win32 import winmanifest, icon, versioninfo, winresource
File "C:\Anaconda3\lib\site-packages\PyInstaller\utils\win32\versioninfo.py", line 17, in <module>
import pefile
ImportError: No module named 'pefile'
What's going on? Pyinstaller works fine with python 2.7 without Anaconda. But I've recently decided to make the jump to Anaconda + 3.5. I cant find any module named pefile or how to install it with Anaconda. I can install pefile easily using pip3 though.
You can use Anaconda's pip to install it, just go to the Script folder in Anaconda and execute:
pip.exe install pefile
install this instead:
conda install -c conda-forge pyinstaller=3.2.1
working fine for me after a couple of tries!

Install Wheel on Raspberry Pi 2 failing - IncompleteRead

I'm trying to install a wheel file and keep stumbling over the following error:
pi#raspberrypi:~ $ pip-3.2 install DsController-1.0-py3-none-any.whl
Traceback (most recent call last):
File "/usr/bin/pip-3.2", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in
load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in
load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in
<module>
from pip.download import path_to_url
File "/usr/lib/python3/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name 'IncompleteRead'
I followed the answer in this thread: How do I fix 'ImportError: cannot import name IncompleteRead'?, unfortunately without success.
The Wheel can be installed without problems under Windows.
You are not picking up the version of pip that you have installed when running pip-3.2.
As you can see, version 8.1.2 of download.py does not import IncompleteRead. However, version 1.5.6 of download.py does.
Either your copy of pip and pip-3.2 are not the same executable (and so just using pip will work), or your system has a confused import path that means you are picking up the wrong version of the pip package. In the latter case, remvoing the old installation or fixing your import path should work.

How can I install 'sphinxext module' in IPython

I tried to install pygments-ipython-console.
In requirements it says:
This needs IPython 1.0+ for sphinxext module
How can I install this module?
I dont find anything in my packet manager (yum).
The following error indicates that the module is not installed:
An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons
Traceback (most recent call last):
File "/usr/share/anki/aqt/addons.py", line 39, in loadAddons
__import__(file.replace(".py", ""))
File "/home/cmueller/Anki/addons/Syntax Highlighting for Code.py", line 2, in <module>
import code_highlight_addon.code_highlight_addon
File "/home/cmueller/Anki/addons/code_highlight_addon/code_highlight_addon.py", line 211, in <module>
for lex in get_all_lexers():
File "/home/cmueller/Anki/addons/code_highlight_addon/pygments/lexers/__init__.py", line 45, in get_all_lexers
for lexer in find_plugin_lexers():
File "/usr/lib/python2.7/site-packages/pygments/plugin.py", line 53, in find_plugin_lexers
yield entrypoint.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "build/bdist.linux-x86_64/egg/lexer.py", line 4, in <module>
ImportError: No module named sphinxext.ipython_console_highlighting
Thanks to pokoli I realized that my version was not recent enough.
In the README of pygments-ipython-console it still says version 1.0+ is required, that's a mistake.
I have now updated to version 2.2 but still got an Error:
ImportError: cannot import name IPythonConsoleLexer.
That is because there was a renaming in IPython. There is a fork in the pygments-ipython-console repository where this is fixed. So I had to clone the forked repository instead of the initial one.
I reinstalled according to the readme and now everything works fine.

Problems getting twill installed and working in python 2.7

I installed twill by using pip, and another try using easy_install, I want to play around with it in Powershell. Following this page - http://twill.idyll.org/ I wanted to play around with it.
To start using twill, install it and then type twill-sh. At the prompt type:
go http://www.slashdot.org/
show
showforms
showhistory
When I type twill-sh it doesn't work. I have typed it in power shell, tried it after loading python, and tried it after using import twill and trying it. I only get errors.
Traceback (most recent call last):
File "C:\Python27\Scripts\twill-sh-script.py", line 9, in <module>
load_entry_point('twill==1.8.0', 'console_scripts', 'twill-sh')()
File "build\bdist.win32\egg\pkg_resources.py", line 356, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2439, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2155, in load
File "C:\Python27\lib\site-packages\twill\__init__.py", line 52, in <module>
from shell import TwillCommandLoop
File "C:\Python27\lib\site-packages\twill\shell.py", line 9, in <module>
from twill import commands, parse, __version__
File "C:\Python27\lib\site-packages\twill\commands.py", line 7, in <module>
from lxml import html
How do I just load modules so I can play with them without writing scripts?
I had the same problem. Further down the log I found the following:
File "C:\Anaconda\lib\site-packages\lxml\cssselect.py", line 18, in <module> raise ImportError('cssselect seems not to be installed. '
ImportError: cssselect seems not to be installed. See http://packages.python.org/cssselect/
Which I fixed by installing package cssselect (using conda as I have an Anaconda installation, pip should do the same).
conda install cssselect

Pip on Mac OS X ImportError: cannot import name walk_packages

I have found several pip problems on stack overflow, but unfortunately it seems like I am experiencing some that I can't find.
Particularly I am getting following error message whenever I try to use pip:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 357, in load_entry_point
"""Yield named metadata resource as list of non-blank non-comment lines
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2394, in load_entry_point
except ValueError:
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2108, in load
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/__init__.py", line 10, in <module>
from pip.backwardcompat import u, walk_packages, console_to_str
ImportError: cannot import name walk_packages
Does anyone have any idea what can be wrong?
Until now I have tried to reinstall pip as it was recommended here: Python mechanize module not found and I have also tried this Pip using system python osx, but non of them works for me.
Thank you in advance for any advices.
Somehow solved by command sudo easy_install -U pip

Categories

Resources