Cannot install python package in Git Bash - python

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.

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

Installing Pylint

I am trying to turn on Pylint.
I type in 'Ctrl + Shift + P', and I click Python: Select Linter, and then I try to click 'bandit'.
When I do this, the pop up window in the bottom right corner says 'Linter bandit is not installed'.
When I click install, I get:
Collecting bandit
Using cached https://files.pythonhosted.org/packages/5a/50/ff2f2c8f1f0ca1569f678eeb608c0f973b835985410985594fbee96be820/bandit-1.6.2-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2795, in _dep_map
return self.__dep_map
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2652, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py", line 211, in main
status = self.run(options, args)
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\commands\install.py", line 294, in run
requirement_set.prepare_files(finder)
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 561, in _prepare_file
set(req_to_install.extras) - set(dist.extras)
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2774, in extras
return [dep for dep in self._dep_map if dep]
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2797, in _dep_map
self.__dep_map = self._compute_dependencies()
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2830, in _compute_dependencies
common = frozenset(reqs_for_extra(None))
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2827, in reqs_for_extra
if req.marker_fn(override={'extra':extra}):
File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\_markerlib\markers.py", line 113, in marker_fn
return eval(compiled_marker, environment)
File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined
You are using pip version 7.1.2, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have already upgraded my pip version to the most recent. Basic Googling tells me that this is using a virtual environment, and the venv is using an earlier version of pip, but I have no idea how to fix this.
Please help.

python2.7 install python daemon package using pip

When I try to install python daemon package I get this error all the time (installation tried by using pip command & downloading the archive and using pip to install):
pip install python-daemon-2.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/7p/x12ctdl94d59qnm_chhj2y240000gn/T/pip-2bGssA-build/setup.py", line 86, in <module>
"Topic :: Software Development :: Libraries :: Python Modules",
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "version.py", line 640, in __init__
super(ChangelogAwareDistribution, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 317, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 372, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 438, in fetch_build_egg
cmd.ensure_finalized()
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 251, in finalize_options
'dist_version': self.distribution.get_version(),
File "version.py", line 656, in get_version
version_info = self.get_version_info()
File "version.py", line 651, in get_version_info
changelog_path = get_changelog_path(self)
File "version.py", line 552, in get_changelog_path
setup_dirname = os.path.dirname(distribution.script_name)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 122, in dirname
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7p/x12ctdl94d59qnm_chhj2y240000gn/T/pip-2bGssA-build/
I'm new to python, searching for the error code and using the steps provided by other threads doesn't solved the problem.
Just write pip install python-daemon==2.1.2
No need to download python-daemon-2.1.2.tar.gz file while installing from PyPI using pip.
If you want to install using downloaded package follow these steps
tar xvf python-daemon-2.1.2.tar.gz
cd python-daemon-2.1.2
python setup.py install

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.

can't install setuptools for python3 on RedHat

My system is RedHat 7.0 + python3.4
There is no package with yum install.
So i use
python3 ez_setup.py
to install Setuptools.
But there are some errors showed up
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-8.2.1.zip
Extracting in /tmp/tmpzu9sj75k
Traceback (most recent call last):
File "ez_setup.py", line 332, in <module>
sys.exit(main())
File "ez_setup.py", line 329, in main
return _install(archive, _build_install_args(options))
File "ez_setup.py", line 51, in _install
with archive_context(archive_filename):
File "/usr/local/lib/python3.4/contextlib.py", line 59, in __enter__
return next(self.gen)
File "ez_setup.py", line 101, in archive_context
archive.extractall()
File "/usr/local/lib/python3.4/zipfile.py", line 1240, in extractall
self.extract(zipinfo, path, pwd)
File "/usr/local/lib/python3.4/zipfile.py", line 1228, in extract
return self._extract_member(member, path, pwd)
File "/usr/local/lib/python3.4/zipfile.py", line 1290, in _extract_member
with self.open(member, pwd=pwd) as source, \
File "/usr/local/lib/python3.4/zipfile.py", line 1210, in open
close_fileobj=not self._filePassed)
File "/usr/local/lib/python3.4/zipfile.py", line 651, in __init__
self._decompressor = _get_decompressor(self._compress_type)
File "/usr/local/lib/python3.4/zipfile.py", line 614, in _get_decompressor
return zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'
why is that so hard to install pip3....
Can anyone help me? Thanks!
I used this to install
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
I found this if it can help you :
http://showmedo.com/videotutorials/video?name=2070000

Categories

Resources