stash
stash copied to clipboard
pip issue
[~/Documents]$ pip install paramiko
Querying PyPI ...
Downloading package ...
Opening: https://pypi.python.org/packages/source/p/paramiko/paramiko-1.16.0.tar.gz
Save as: /private/var/mobile/Containers/Data/Application/E9922E54-9052-49C5-ACB1-65A32F95E93E/tmp/paramiko-1.16.0.tar.gz (1335094 bytes)
1335094 [100.00%]
Extracting archive file ...
Archive extracted.
Running setup file ...
stash: <type 'exceptions.ValueError'>: substring not found
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/C534C622-2FDA-41F7-AE91-E3AAFE5FFC6B/Documents/site-packages/stash/system/shruntime.py", line 470, in exec_py_file
execfile(file_path, namespace, namespace)
File "site-packages/stash/bin/pip.py", line 1179, in <module>
repository.install(pkg_name, ver_spec)
File "site-packages/stash/bin/pip.py", line 829, in install
self._install(pkg_name, pkg_info, archive_filename)
File "site-packages/stash/bin/pip.py", line 685, in _install
for requirement in dependencies]
File "site-packages/stash/bin/pip.py", line 1079, in parse_requirement
idx3 = requirement.index('<')
ValueError: substring not found
>/private/var/mobile/Containers/Shared/AppGroup/C534C622-2FDA-41F7-AE91-E3AAFE5FFC6B/Documents/site-packages/stash/bin/pip.py(1079)parse_requirement()
-> idx3 = requirement.index('<')
(Pdb) l
1074 version = VersionSpecifier(version)
1075
1076 elif ',' in requirement: # range
1077 idx1 = requirement.index('>')
1078 idx2 = requirement.index(',')
1079 -> idx3 = requirement.index('<')
1080 name = requirement[:idx1]
1081 if requirement[idx1 + 1] == '=':
1082 vmin = requirement[idx1 + 2: idx2]
1083 inclusion_min = True
1084 else:
(Pdb) requirement
'pycrypto>=2.1,!=2.4'
Seems this style requirement is not supported.
See https://www.python.org/dev/peps/pep-0508/ for full requirement grammar.
Thanks @jsbain
I re-wrote pip
in a rush and simplified and even missed many things. Thanks for the information. I didn't even know it exist.
A new issue... The issue was line 293 of the pycrypto setup.py
sub_commands = [ ('build_configure', has_configure) ] + build_ext.sub_commands
since build_ext.sub_commands was a stub, so could not be added to a list.
Changing pip.py line 67 to
class OmniClass(list):
it allows this type of usage. Not sure if there are other side effects.'
I just manually added the sub_commands
attribute (an empty list) to the faked build_ext
modules. This should fix this particular case. I guess we'll have to wait and see if there are more exceptions to come.
did pip ever support version numbers on the commandline? This seems to be broken in dev right now.
pip install pyte 0.4.2
for example.
A short term fix might be an update to ssh, which uses this to install pyte, instead using simply pip install pyte.
@jsbain I don't really remember which revision removed the version argument. But I guess it makes sense since the version specifier is the more correct way to do it. So I just updated the usage in ssh
and telnet
to pip install pyte==0.4.10
. 9ce995ff5ec02189b31317cf735a0341f608b2e7
#45
<toUnable
to install anything with pip, each time it comes back
with::
Querying PyPI ... Downloading package ... Opening: https://files.pythonhosted.org/packages/0e/39/993a5feea8ed9c2eebd70c6e7c20cb4b0823588f5ab0afab4b0be95ebc23/pypng-0.0.19.tar.gz
Save as: /private/var/mobile/Containers/Data/Application/A1D77365-F03A-416D-B1D0-9001742199C4/tmp//pypng-0.0.19.tar.gz (293055 bytes) 293055 [100.00%] Extracting archive file ... Archive extracted. Running setup file ... FileNotFoundError(2, 'No such file or directory') Failed to run setup.py Fall back to directory guessing ... Error: Cannot locate packages. Manual installation required.>
#351 This is really getting annoying as git doesn't work either, 'no url-parse' file or something like that.
#351
It appears that you are running stash in py3. I would recommend still using py2 to run stash (for git at least)On Feb 5, 2019 7:51 AM, Jeremiah Helfer [email protected] wrote:Unable to install anything with pip, each time it comes back with:: Querying PyPI ... Downloading package ... Opening: https://files.pythonhosted.org/packages/0e/39/993a5feea8ed9c2eebd70c6e7c20cb4b0823588f5ab0afab4b0be95ebc23/pypng-0.0.19.tar.gz Save as: /private/var/mobile/Containers/Data/Application/A1D77365-F03A-416D-B1D0-9001742199C4/tmp//pypng-0.0.19.tar.gz (293055 bytes) 293055 [100.00%] Extracting archive file ... Archive extracted. Running setup file ... FileNotFoundError(2, 'No such file or directory') Failed to run setup.py Fall back to directory guessing ... Error: Cannot locate packages. Manual installation required. This is really getting annoying as git doesn't work either, 'no url-parse' file or something like that.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.