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
Related
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
pip install clipboard
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
return func(self, options, args)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\commands\install.py", line 287, in run
session = self.get_default_session(options)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\req_command.py", line 75, in get_default_session
self._session = self.enter_context(self._build_session(options))
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\req_command.py", line 89, in _build_session
session = PipSession(
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\network\session.py", line 282, in __init__
self.headers["User-Agent"] = user_agent()
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\network\session.py", line 157, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\metadata\__init__.py", line 75, in get_default_environment
return select_backend().Environment.default()
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\metadata\__init__.py", line 63, in select_backend
from . import pkg_resources
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_internal\metadata\pkg_resources.py", line 8, in <module>
from pip._vendor import pkg_resources
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3252, in <module>
def _initialize_master_working_set():
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3277, in _initialize_master_working_set
tuple(
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3278, in <genexpr>
dist.activate(replace=False)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2785, in activate
declare_namespace(pkg)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2284, in declare_namespace
_handle_ns(packageName, path_item)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2217, in _handle_ns
loader.load_module(packageName)
File "C:\Users\amin_\AppData\Roaming\Python\Python310\site-packages\pygoogle\google.py", line 113
print """PyGoogle %(__version__)s
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
WARNING: There was an error checking the latest version of pip.
I suggest you can use pyperclip as it is the same a s clipboard and it is newer.
https://pypi.org/project/pyperclip/
import pyperclip
>>> pyperclip.copy('The text to be copied to the clipboard.')
>>> pyperclip.paste()
'The text to be copied to the clipboard.'
Currently only handles plaintext.
On Windows, no additional modules are needed.
On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os.
On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run “sudo apt-get install xclip” or “sudo apt-get install xsel” (Note: xsel does not always seem to work.)
Otherwise on Linux, you will need the gtk or PyQt4 modules installed.
I hope this help. :)
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.
I am trying to install the Atom to be able to develop my sites, but this is having some conflict at the moment that I try to add the repository. The following output is displayed:
marcius#Marcius-PC:~$ sudo add-apt-repository ppa:webupd8team/atom
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 335, in get_ppa_info
ret = get_ppa_info_from_lp(user, ppa)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
return get_info_from_lp(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
return _get_https_content_py3(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in _get_https_content_py3
lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
File "/usr/lib/python3.5/urllib/request.py", line 153, in urlopen
capath=capath)
File "/usr/lib/python3.5/ssl.py", line 470, in create_default_context
context.load_verify_locations(cafile, capath, cadata)
ssl.SSLError: unknown error (_ssl.c:3053)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 122, in <module>
shortcut = shortcut_handler(line)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 864, in shortcut_handler
ret = factory(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 407, in shortcut_handler
return PPAShortcutHandler(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 364, in __init__
info = get_ppa_info(self.shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 347, in get_ppa_info
_get_suggested_ppa_message(user, ppa))
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 304, in _get_suggested_ppa_message
lp_user = get_info_from_lp(LAUNCHPAD_USER_API % user)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
return _get_https_content_py3(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in _get_https_content_py3
lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
File "/usr/lib/python3.5/urllib/request.py", line 153, in urlopen
capath=capath)
File "/usr/lib/python3.5/ssl.py", line 470, in create_default_context
context.load_verify_locations(cafile, capath, cadata)
ssl.SSLError: unknown error (_ssl.c:3053)
marcius#Marcius-PC:~$
It seems to me that some problem with the dependencies of python, someone knows exactly what it is, and better how to correct?
Removing all certs in /usr/share/ca-certificates and then reinstalling worked for me.
Try this:
sudo rm -rf /usr/share/ca-certificates
sudo apt-get --reinstall install ca-certificates
Source: https://ubuntuforums.org/showthread.php?t=2113326
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