When I try to install Review Board via this command on Ubuntu 14.04:
sudo rb-site install /var/www/reviewboard.mysite.com
I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/rb-site", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2927, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2913, in _call_aside
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 635, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 943, in require
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 829, in resolve
pkg_resources.DistributionNotFound: The 'cryptography>=1.1' distribution was not found and is required by paramiko
How do I fix it?
You need to run:
sudo easy_install --upgrade cryptography
Related
I'm trying to get django-location-field installed on django version 2.1.2 using python3.
I installed it and added location_field.apps.DefaultConfig to settings, then an error pops up for a missing package gdal.
Error
python3 manage.py runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7efbf9f56d90>
Traceback (most recent call last):
...
File "/home/samuel/Documents/code/DECOMAGNA/decomagna/inventory/models.py", line 3, in <module>
from django.contrib.gis.geos import Point
...
from django.contrib.gis import gdal
...
File "/home/samuel/.local/lib/python3.6/site-packages/django/contrib/gis/gdal/prototypes/ds.py", line 9, in <module>
from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
File "/home/samuel/.local/lib/python3.6/site-packages/django/contrib/gis/gdal/libgdal.py", line 43, in <module>
% '", "'.join(lib_names)
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
Trying to install it throws an error for the package.
pip3 install GDAL
Collecting GDAL
Using cached https://files.pythonhosted.org/packages/e5/57/7f0536cd46bebb30e709b8cd3bcebf9c3d4acc4ad5e9d7bfc73cd39c09a9/GDAL-2.3.2.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/GDAL.egg-info
writing pip-egg-info/GDAL.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/GDAL.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/GDAL.egg-info/top_level.txt
writing manifest file 'pip-egg-info/GDAL.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "/tmp/pip-build-84b30dz9/GDAL/setup.py", line 153, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config': '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-build-84b30dz9/GDAL/setup.py", line 240, in get_gdal_config
return fetch_config(option, gdal_config=self.gdal_config)
File "/tmp/pip-build-84b30dz9/GDAL/setup.py", line 157, in fetch_config
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config': '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-build-84b30dz9/GDAL/setup.py", line 153, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config': 'gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-84b30dz9/GDAL/setup.py", line 435, in <module>
setup(**setup_kwargs)
File "/home/samuel/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
...
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config': 'gdal-config'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-84b30dz9/GDAL/
I'm also using it on a virtualenv and I've also tried using a --user with no success.
I've added this as the code for
since you are using ubuntu machine, run this command in the terminal
sudo apt-get install binutils libproj-dev gdal-bin
I tried to install eb cli throw pip or msi and i always get the same wierd message after i check if eb was installed successfully:
PS C:\Users\liron> eb --version
Traceback (most recent call last):
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 570, in _build_master
ws.require(requires)
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 888, in require
needed = self.resolve(parse_requirements(requirements))
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 779, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (colorama 0.3.9 (c:\users\liron\appdata\roaming\python\python36\site-packages), Requirement.parse('colorama==0.3.7'), {'awsebcli'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\liron\AppData\Roaming\Python\Scripts\eb-script.py", line 6, in
from pkg_resources import load_entry_point
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 3095, in
#_call_aside
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 3079, in _call_aside
f(*args, **kwargs)
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 572, in _build_master
return cls._build_from_requirements(requires)
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 585, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "C:\Users\liron\AppData\Roaming\Python\Python36\site-packages\pkg_resources__init__.py", line 779, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (colorama 0.3.7 (c:\users\liron\appdata\roaming\python\lib\site-packages), Requirement.parse('colorama<0.4,>=0.3.9; sys_platform == "win32"'), {'docker-compose'})
i tried to install with pip and msi.
aws version: aws-cli/1.15.35 Python/3.6.0 Windows/7 botocore/1.10.35
python version: Python 3.6.3
pip version: pip 10.0.1 from c:\users\liron\appdata\roaming\python\lib\site-packages\pip (python 3.6).
i tried to update and uninstall everything without any luck.
thank you for your help :)
1.5.0 installs fine, but when I import tensorflow, I get this error:
RuntimeError: module compiled against API version 0xa but this version
of numpy is 0x9 RuntimeError: module compiled against API version 0xa
but this version of numpy is 0x9 Traceback (most recent call last):
File "<stdin>", line 1, in <module> File
"/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 24,
in <module>
from tensorflow.python import * File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py",
line 63, in <module>
from tensorflow.python.framework.framework_lib import * File "/Library/Python/2.7/site-packages/tensorflow/python/framework/framework_lib.py",
line 81, in <module>
from tensorflow.python.framework.sparse_tensor import SparseTensor File
"/Library/Python/2.7/site-packages/tensorflow/python/framework/sparse_tensor.py",
line 25, in <module>
from tensorflow.python.framework import tensor_util File "/Library/Python/2.7/site-packages/tensorflow/python/framework/tensor_util.py",
line 34, in <module>
from tensorflow.python.framework import fast_tensor_util File "__init__.pxd", line 163, in init
tensorflow.python.framework.fast_tensor_util ValueError: numpy.dtype
has the wrong size, try recompiling. Expected 88, got 96
1.6.0 fails to install with this error:
DEPENDENCY ERROR
The target you are trying to run requires an OpenSSL implementation.
Your system doesn't have one, and either the third_party directory
doesn't have it, or your compiler can't build BoringSSL.
Please consult INSTALL to get more information.
If you need information about why these tests failed, run:
make run_dep_checks
make: Circular /private/tmp/pip-build-Lth8PD/grpcio/libs/opt/libares.a <- /private/tmp/pip-build-Lth8PD/grpcio/libs/opt/libz.a dependency dropped.
make: *** [stop] Error 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-Lth8PD/grpcio/setup.py", line 311, in <module>
cmdclass=COMMAND_CLASS,
File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
self.run_command('build')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 337, in run
self.build_extensions()
File "/private/tmp/pip-build-Lth8PD/grpcio/src/python/grpcio/commands.py", line 278, in build_extensions
raise Exception("make command failed!")
Exception: make command failed!
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/private/tmp/pip-build-Lth8PD/grpcio/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record /tmp/pip-eSD2il-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-Lth8PD/grpcio/
I ran into the same issue. The installation error is because the new version of tensorflow requires new dependencies (grpcio). Here is how I handle my problem.
Force installing the binary wheels.
$ pip install --no-cache-dir --only-binary :all: grpcio==1.10.1
Then I can upgrade my tensorflow.
$ pip install --upgrade tensorflow # for Python 2.7
$ pip3 install --upgrade tensorflow # for Python 3.n
Hope it helps.
Whats I'll do ?
odoo#odoo-Aspire-ES1-572:~$ pip2 install pyboleto
Collecting pyboleto
Using cached pyboleto-0.3.1.tar.gz
Collecting distribute (from pyboleto)
Using cached distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/distribute.egg-info
writing requirements to pip-egg-info/distribute.egg-info/requires.txt
writing pip-egg-info/distribute.egg-info/PKG-INFO
writing top-level names to pip-egg-info/distribute.egg-info/top_level.txt
writing dependency_links to pip-egg-info/distribute.egg-info/dependency_links.txt
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-wdypyY/distribute/setup.py", line 58, in <module>
setuptools.setup(**setup_params)
File "/home/odoo/.pyenv/versions/2.7.12/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/odoo/.pyenv/versions/2.7.12/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/odoo/.pyenv/versions/2.7.12/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setuptools/command/egg_info.py", line 177, in run
writer = ep.load(installer=installer)
File "pkg_resources.py", line 2241, in load
if require: self.require(env, installer)
File "pkg_resources.py", line 2254, in require
working_set.resolve(self.dist.requires(self.extras),env,installer)))
File "pkg_resources.py", line 2471, in requires
dm = self._dep_map
File "pkg_resources.py", line 2682, in _dep_map
self.__dep_map = self._compute_dependencies()
File "pkg_resources.py", line 2699, in _compute_dependencies
from _markerlib import compile as compile_marker
ImportError: No module named _markerlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wdypyY/distribute/
odoo#odoo-Aspire-ES1-572:~$ pip2 install _markerlib
Invalid requirement: '_markerlib'
Traceback (most recent call last):
File "/home/odoo/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 82, in __init__
req = Requirement(req)
File "/home/odoo/.local/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'_markerl'"
Please try the following:
sudo apt-get update # Fetches the list of available updates
sudo apt-get upgrade # Strictly upgrades the current packages
sudo apt-get dist-upgrade # Installs updates (new ones)
sudo pip install pyboleto
i want to create python virtualenv with python version 2.7.6 but there is error as follow , even i wanted to reinstall pip but it showed that pip is of latest version:
$ virtualenv cow-env
New python executable in cow-env/bin/python Installing setuptools,
pip...
Complete output from command /home/cow/cow/cow-env/bin /python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/python-virtualenv/pip-1.5debian1-py2.py3-
none-any.whl /pip/__init__.py", line 10, in <module>
File "/usr/share/python-virtualenv/pip-1.5debian1-py2.py3-none-any.whl
/pip/util.py", line 18, in <module>
File "/usr/share/python-virtualenv/pip-1.5debian1-py2.py3-none-any.whl
/pip/_vendor/distlib/version.py", line 14, in <module>
File "/usr/share/python-virtualenv/pip-1.5debian1-py2.py3-none-any.whl
/pip/_vendor/distlib/compat.py", line 31, in <module>
ImportError: cannot import name HTTPSHandler
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 3, in <module>
virtualenv.main()
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 825, in main
symlink=options.symlink)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 993, in
create_environment
install_wheel(to_install, py_executable, search_dirs)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 961, in
install_wheel
'PIP_NO_INDEX': '1'
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 903,
in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/cow/cow/cow-env/bin/python -c "import sys,pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
output of $pip --version is as follow:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 60, in <module>
from pip.util import get_installed_distributions, get_prog
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 19, in <module>
from distlib import version
File "/usr/share/python-wheels/distlib-0.1.8-py2.py3-none-any.whl /distlib/version.py", line 14, in <module>
File "/usr/share/python-wheels/distlib-0.1.8-py2.py3-none-any.whl /distlib/compat.py", line 31, in <module>
ImportError: cannot import name HTTPSHandler
this issue has been resolved by reinstalling the libpython2.7-stdlib package.
sudo apt-get --reinstall install libpython2.7-stdlib
this re installation placed the missing file _ssl.so in /usr/lib/python2.7/lib-dynload.