python3 venv vs ansible 2.9.x installation fails - python

I'm trying to update our venv of ansible to a newer version on an older RHEL 7 box :), only it seems to fail for some unclear reasons in some python code.
Running python 3.6.8 on RHEL 7.9 (Maipo)
Any hints are most appreciated, TIA!
$ source a2.9.27/bin/activate
$ type which python
which is aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
python is /opt/pjp_ansible/virtual_env/a2.9.27/bin/python
$ which pip
/opt/pjp_ansible/virtual_env/a2.9.27/bin/pip
$ pip install ansible==2.9.27
Collecting ansible==2.9.27
Using cached ansible-2.9.27.tar.gz (14.8 MB)
ERROR: Exception:
Traceback (most recent call last):
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
status = run_func(*args)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/commands/install.py", line 339, in run
reqs, check_supported_wheels=not options.target_dir
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 93, in resolve
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 482, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 349, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
return bool(self._sequence)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
return any(self)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
version=version,
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 287, in __init__
version=version,
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
self.dist = self._prepare()
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 292, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/operations/prepare.py", line 528, in _prepare_linked_requirement
link, req.source_dir, self._download, self.download_dir, hashes
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/operations/prepare.py", line 223, in unpack_url
unpack_file(file.path, location, file.content_type)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 247, in unpack_file
untar_file(filename, location)
File "/opt/pjp_ansible/virtual_env/a2.9.27/lib64/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 218, in untar_file
with open(path, "wb") as destfp:
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 112: ordinal not in range(128)

found this: realpython.com/intro-to-pyenv which enabled me to create a newer python env and apply in multiple virtual env each with their version of ansible compiled from sources.

Related

Unable to pip install PyTorch due to [Errno 28] No space left on device

Trying to install PyTorch using this command:
py -m pip install --cache-dir=D:/CodePackages/temp --target=D:\CodePackages torch==1.13.1 -f https://download.pytorch.org/whl/torch_stable.html
And it is giving me these errors:
ERROR: Exception:
Traceback (most recent call last):
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 437, in _error_catcher
yield
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 560, in read
data = self._fp_read(amt) if not fp_closed else b""
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 526, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 94, in read
self.__buf.write(data)
File "C:\Users\GorillaPenguin\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 483, in func_wrapper
return func(*args, **kwargs)
OSError: [Errno 28] No space left on device
Traceback (most recent call last):
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\commands\install.py", line 400, in run
requirement_set = resolver.resolve(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
return bool(self._sequence)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
return any(self)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 297, in __init__
super().__init__(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 162, in __init__
self.dist = self._prepare()
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 491, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 536, in _prepare_linked_requirement
local_file = unpack_url(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 166, in unpack_url
file = get_http_url(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 107, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\network\download.py", line 147, in __call__
for chunk in chunks:
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\cli\progress_bars.py", line 53, in _rich_progress_bar
for chunk in iterable:
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 621, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 559, in read
with self._error_catcher():
File "C:\Users\GorillaPenguin\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "D:\Unity\ReinforcementLeaning_InfoProject\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 454, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: ("Connection broken: OSError(28, 'No space left on device')", OSError(28, 'No space left on device'))
`
I'm using Python 3.10.8, latest version of pip, Windows 10.
The directory has more than enough space and I've tried changing the cache directory with --cache-dir without success. Any help is appreciated :) thanks
The error message you are seeing is likely due to one of the following reasons:
The specified path D:/CodePackages/temp or D:\CodePackages does not exist or is not accessible. You should make sure that the path exists and you have the necessary permissions to write to it.
The pip version that you are using is outdated. You should try running py -m pip install --upgrade pip to update pip to the latest version.
There may be an issue with the URL you are using in the -f flag. Try using the URL https://download.pytorch.org/whl/cu111/torch-1.13.1%2Bcu111-cp37-cp37m-win_amd64.whl .
If you have other version of python or pytorch installed it might cause conflict, you should try to uninstall previous versions of PyTorch, python and install the correct version.
Sometimes firewall or antivirus software can block the installation process, you should try to add exception in your firewall or antivirus software.
You might also want to try installing PyTorch without the --target and --cache-dir flags, to see if that resolves the issue.
py -m pip install torch==1.13.1 -f https://download.pytorch.org/whl/cu111/torch-1.13.1%2Bcu111-cp37-cp37m-win_amd64.whl

Installation of py3exiv2 fails on MBP M1, macOS Big Sur | InstallationError: No .egg-info directory found in

Installation of py3exiv2 (using pip) on my MacBook Pro M1 fails, with the InstallationError: No .egg-info directory found in... error.
I have tried the solutions posted in other place such as this thread, to no avail:
Installation of py3exiv2 on macOS Big Sur fails | ERROR: No .egg-info directory found in
Here is the trace from the pip log file:
2021-08-25T12:45:22,965 Exception information:
2021-08-25T12:45:22,965 Traceback (most recent call last):
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
2021-08-25T12:45:22,965 status = self.run(options, args)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
2021-08-25T12:45:22,965 return func(self, options, args)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 315, in run
2021-08-25T12:45:22,965 requirement_set = resolver.resolve(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
2021-08-25T12:45:22,965 result = self._result = resolver.resolve(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
2021-08-25T12:45:22,965 state = resolution.resolve(requirements, max_rounds=max_rounds)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve
2021-08-25T12:45:22,965 self._add_to_criteria(self.state.criteria, r, parent=None)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
2021-08-25T12:45:22,965 if not criterion.candidates:
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
2021-08-25T12:45:22,965 return bool(self._sequence)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 140, in __bool__
2021-08-25T12:45:22,965 return any(self)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 128, in <genexpr>
2021-08-25T12:45:22,965 return (c for c in iterator if id(c) not in self._incompatible_ids)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 32, in _iter_built
2021-08-25T12:45:22,965 candidate = func()
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 204, in _make_candidate_from_link
2021-08-25T12:45:22,965 self._link_candidate_cache[link] = LinkCandidate(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 295, in __init__
2021-08-25T12:45:22,965 super().__init__(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
2021-08-25T12:45:22,965 self.dist = self._prepare()
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
2021-08-25T12:45:22,965 dist = self._prepare_distribution()
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 305, in _prepare_distribution
2021-08-25T12:45:22,965 return self._factory.preparer.prepare_linked_requirement(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 508, in prepare_linked_requirement
2021-08-25T12:45:22,965 return self._prepare_linked_requirement(req, parallel_builds)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 570, in _prepare_linked_requirement
2021-08-25T12:45:22,965 dist = _get_prepared_distribution(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 60, in _get_prepared_distribution
2021-08-25T12:45:22,965 abstract_dist.prepare_distribution_metadata(finder, build_isolation)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/distributions/sdist.py", line 36, in prepare_distribution_metadata
2021-08-25T12:45:22,965 self.req.prepare_metadata()
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 528, in prepare_metadata
2021-08-25T12:45:22,965 self.metadata_directory = self._generate_metadata()
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 504, in _generate_metadata
2021-08-25T12:45:22,965 return generate_metadata_legacy(
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 74, in generate_metadata
2021-08-25T12:45:22,965 return _find_egg_info(egg_info_dir)
2021-08-25T12:45:22,965 File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 25, in _find_egg_info
2021-08-25T12:45:22,965 raise InstallationError(
2021-08-25T12:45:22,965 pip._internal.exceptions.InstallationError: No .egg-info directory found in /private/var/folders/9m/k2j6pg_95k9__bhyxsygz2540000gp/T/pip-pip-egg-info-jli5hrba```
Try this.
pip install --upgrade setuptools pip
Ok, I figured out why this does not work on M1 MacOS and how to fix it.
The problem is that M1 MacOS puts homebrew in /opt/ instead of /usr/local/. The py3exiv2 people hard coded /usr/ in setup.py. I will try to reach out to them, but am not so experienced. If you do know how to report it, please do.
Here is the full HowTo:
Install needed dependecies. At least this should be:
brew install exiv2 boost boost-python3
Download py3exiv2 from here:
https://pypi.org/project/py3exiv2/#files
Extract the tar.gz into a folder. You can just doubleclick it in Finder.
Edit the setup.py and change line 25. Make sure the version number matches yours. Check the path with ls.
Old:
def get_libboost_osx():
places = ["/usr/local/lib/"]
New:
def get_libboost_osx():
places = ["/opt/homebrew/Cellar/boost-python3/1.78.0/lib/"]
Compress the folder content again. Your version number or foldername might be different.
tar -czvf py3exiv2-0.9.3-edited.tar.gz py3exiv2-0.9.3/*
Then add the variables as was answered before. Note that for M1 Macs the paths are also in /opt/homebrew/ and not /usr/local/. Also make sure the version numbers match yours. I checked everything by browsing the folders with ls.
export CPLUS_INCLUDE_PATH=/opt/homebrew/Cellar/exiv2/0.27.5_1/include/:/opt/homebrew/opt/libssh/include/:/opt/homebrew/Cellar/boost/1.78.0_1/include/
export LDFLAGS="-L/opt/homebrew/Cellar/boost-python3/1.78.0/lib -L/opt/homebrew/Cellar/exiv2/0.27.5_1/lib"
Then install it. The -v gives you more hints. That is how I found the places thing in the first place. It just never found boost and it will only tell you in verbose mode.
pip3 install py3exiv2-0.9.3-edited.tar.gz -v
Hope this helped :)

Cannot install python package in Git Bash

I'm trying to install a package from my company's internal artifactory storage. I'm getting 2 exceptions in Gitbash that I can't understand. When I run Pip Freeze I don't see the install package, so I don't believe it is already installed.
After reading the exceptions, I don't understand what's going on, is anyone familiar with this?
pip install --no-dependencies --user -i https://artifactory.cloud.company.com/artifactory/api/pypi/pypi-python-org/simple git+https://github.kdc.company.com/MandR/package.git
Looking in indexes: https://artifactory.cloud.company.com/artifactory/api/pypi/pypi-python-org/simple
Collecting git+https://github.kdc.company.com/MandR/package.git
Cloning https://github.kdc.company.com/MandR/package.git to c:\users\user_name\appdata\local\temp\pip-req-build-ptb41on4
Exception:
Traceback (most recent call last):
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 339, in check_if_exists
self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 476, in get_distribution
dist = get_provider(dist)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 352, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 895, in require
needed = self.resolve(parse_requirements(requirements))
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 786, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (tables 3.4.3 (c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages), Requirement.parse('tables==3.2.0'), {'package'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
status = self.run(options, args)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
resolver.resolve(requirement_set)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 221, in _get_abstract_dist_for
req.check_if_exists(self.use_user_site)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 350, in check_if_exists
self.req.name
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 476, in get_distribution
dist = get_provider(dist)
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 352, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 895, in require
needed = self.resolve(parse_requirements(requirements))
File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 786, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (tables 3.4.3 (c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages), Requirement.parse('tables==3.2.0'), {'package'})
It looks like you have the wrong version of the tables package installed. Trying installing the required version with pip install tables==3.2.0.

Failure trying to install Python 2.x pip & setuptools on MS Windows 7.0

I have just installed Python 2.6.6 64-bit. I first had problems on Python command line because of an encoding bug which I think I solved it based on instructions mentioned in: Windows command line encoding causes Python crash.
Then I tried to install pip using admin's Windows powershell after reading instructions provided in: How to install Python pip and PyPA pip installation manual. It failed and I received this in shell:
Exception:
Traceback (most recent call last):
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 659, in unpack_http_url
hashes)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\utils\hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\download.py", line 571, in written_chunks
for chunk in chunks:
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\utils\ui.py", line 141, in iter
self.next(n)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\__init__.py", line 73, in next
self.update()
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\bar.py", line 79, in update
self.writeln(line)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\progress\helpers.py", line 68, in writeln
print(line, end='', file=self.file)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 141, in write
self.write_and_convert(text)
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 169, in write_and_
convert
self.write_plain_text(text, cursor, len(text))
File "c:\users\u068\appdata\local\temp\tmpk0wofk\pip.zip\pip\_vendor\colorama\ansitowin32.py", line 174, in write_plai
n_text
self.wrapped.write(text[start:end])
UnicodeEncodeError: 'ascii' codec can't encode character u'\u258e' in position 8: ordinal not in range(128)
Then I tried to install setuptools easy_install after reading the same source and PyPA setuptools installation manual using powershell. It failed again and I received this:
Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occur
red on a send."
At line:1 char:152
+ [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object
System.Net.WebClient).DownloadFile <<<< ("https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip", "C:\setu
ptools-33.1.1.zip")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
Traceback (most recent call last):
File "ez_setup.py", line 414, in <module>
sys.exit(main())
File "ez_setup.py", line 410, in main
archive = download_setuptools(**_download_args(options))
File "ez_setup.py", line 355, in download_setuptools
downloader(url, saveto)
File "ez_setup.py", line 256, in download_file_powershell
_clean_check(cmd, target)
File "ez_setup.py", line 230, in _clean_check
subprocess.check_call(cmd)
File "c:\Python26\lib\subprocess.py", line 488, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['powershell', '-Command', '[System.Net.WebRequest]::DefaultWebProxy.Credentials
= [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile("https://pypi.io/pac
kages/source/s/setuptools/setuptools-33.1.1.zip", "C:\\setuptools-33.1.1.zip")']' returned non-zero exit status 1
How can it be fixed?

Python -pip install Exception for any Libary\Package i'm trying to install

Im using Python 2.7 on windows 8.1, using Visual Studio as f.w
Anyway,
After installing python and some packages couple of days ago, I'm unable anymore to pip install packages (Any of them -Just name it) and keep getting the exception below, which contains tens of error
P.S :
No changes were done in my environment.
I have tried to upgrade pip as well and got same error
Thanks for the help
The same error i'm getting all time:
----- Installing 'webdriver' -----
Collecting webdriver
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 211, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 294, in run
requirement_set.prepare_files(finder)
File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 334, in
prepare_files
functools.partial(self._prepare_file, finder))
File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 321, in
_walk_req_to_install
more_reqs = handler(req_to_install)
File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 461, in
_prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "C:\Python27\lib\site-packages\pip\req\req_install.py", line 250, in
populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Python27\lib\site-packages\pip\index.py", line 486, in
find_requirement
all_versions = self._find_all_versions(req.name)
File "C:\Python27\lib\site-packages\pip\index.py", line 404, in
_find_all_versions
index_locations = self._get_index_urls_locations(project_name)
File "C:\Python27\lib\site-packages\pip\index.py", line 378, in
_get_index_urls_locations
page = self._get_page(main_index_url)
File "C:\Python27\lib\site-packages\pip\index.py", line 818, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Python27\lib\site-packages\pip\index.py", line 949, in get_page
trusted=link.trusted,
File "C:\Python27\lib\site-packages\pip\index.py", line 866, in __init__
namespaceHTMLElements=False,
File "C:\Python27\lib\site-packages\pip\_vendor\html5lib\html5parser.py",
line 27, in parse
tb = treebuilders.getTreeBuilder(treebuilder)
File "C:\Python27\lib\site-
packages\pip\_vendor\html5lib\treebuilders\__init__.py", line 73, in
getTreeBuilder
return etree.getETreeModule(implementation, **kwargs).TreeBuilder
File "C:\Python27\lib\site-packages\pip\_vendor\html5lib\utils.py", line 98,
in moduleFactory
objs = factory(baseModule, *args, **kwargs)
File "C:\Python27\lib\site-
packages\pip\_vendor\html5lib\treebuilders\etree.py", line 17, in
getETreeBuilder
ElementTreeCommentType = ElementTree.Comment("asd").tag
AttributeError: 'module' object has no attribute 'Comment'
You are using pip version 7.1.2, however version 8.0.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip'
command.

Categories

Resources