yara-python icon indicating copy to clipboard operation
yara-python copied to clipboard

Could not find a version that satisfies the requirement yara-python==3.9.0

Open sbruno opened this issue 5 years ago • 14 comments

Cannot install yara-python 3.9.0 in Linux using pip because there is no matching package.

Comparing with previous version: https://pypi.org/project/yara-python/3.8.1/#files

Source file was called yara-python-3.8.1.tar.gz But current is yara-python-3.9.0.macosx-10.13-intel.tar.gz

I think that could be the problem.

sbruno avatar Feb 25 '19 13:02 sbruno

As a workaround you can do

pip install -U git+https://github.com/VirusTotal/yara-python

To build the ltetest commit from git instead.

seanthegeek avatar Mar 12 '19 13:03 seanthegeek

Same issue here. I was not able to install 3.9.0 neither on Linux nor on Mac OS X

# pip install yara-python==3.9.0
Collecting yara-python==3.9.0
  Could not find a version that satisfies the requirement yara-python==3.9.0 (from versions: 3.9.0.macosx-10.13-intel, 3.5.0, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.7.0, 3.8.0, 3.8.1)
No matching distribution found for yara-python==3.9.0

buffer avatar Mar 15 '19 14:03 buffer

pipenv also can't seem to handle this (thus breaking my Travis builds)

[pipenv.exceptions.InstallError]: ['Could not find a version that satisfies the requirement yara-python==3.9.0 (from -r /tmp/pipenv-a8fe4y8j-requirements/pipenv-2a0iudui-requirement.txt (line 1)) (from versions: 3.9.0.macosx-10.13-intel, 3.5.0, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.7.0, 3.8.0, 3.8.1)', 'No matching distribution found for yara-python==3.9.0 (from -r /tmp/pipenv-a8fe4y8j-requirements/pipenv-2a0iudui-requirement.txt (line 1))']

tomchop avatar Mar 19 '19 23:03 tomchop

@plusvic were there any changes in the build process or how it is published to pypi since 3.8.1? I don't see any change in this repo that could have caused the source distribution to be generated differently.

sbruno avatar Mar 20 '19 00:03 sbruno

@tomchop As a workaround, you can replace the yara line in your requirements.txt file with:

git+https://github.com/VirusTotal/yara-python

seanthegeek avatar Mar 21 '19 11:03 seanthegeek

This is not a workaround I would suggest at all because you would end up installing from HEAD. This means users will install different "versions" of the package. And HEAD is not even supposed to work correctly while releases are created exactly for this purpose. The perfect recipe for disaster if your code is used by people other than you.

buffer avatar Mar 21 '19 12:03 buffer

To avoid that maybe specifying the commit for 3.9.0 could work, or even the version. I haven't tried any of those but I think it should work:

git+https://github.com/VirusTotal/yara-python@63ac2417a918692be6d5bd659fbfd39564396ec3

git+https://github.com/VirusTotal/[email protected]

sbruno avatar Mar 21 '19 12:03 sbruno

Neither of the two mentioned options work. Is there a plan to fix this? Asking before I create my own wheel, since I need the new 3.9.0 version in my env.

MrCrumbs avatar Apr 16 '19 07:04 MrCrumbs

Those commands work for me. What errors are you getting?

seanthegeek avatar Apr 23 '19 06:04 seanthegeek

I just checked now and it seems you're right.. even though I could have sworn I tried it before and it gave me the same original error (of this issue). Still, wouldn't it be best to fix this issue?

MrCrumbs avatar Apr 23 '19 16:04 MrCrumbs

I'd like to see a proper release too, but I'm not a member of this project.

seanthegeek avatar Apr 24 '19 01:04 seanthegeek

Does using a newer version of the python interface actually cause problems?

Ubuntu 20.04 provides python version 3.11.0 even though the yara version is still 3.9.0 - https://packages.ubuntu.com/focal/python3-yara

wesinator avatar Jun 14 '20 17:06 wesinator

Even after i added the yara-python line in requirements.txt getting below error C:\Users\saikrishna>pip install git+https://github.com/VirusTotal/[email protected] Collecting git+https://github.com/VirusTotal/[email protected] Cloning https://github.com/VirusTotal/yara-python (to revision v3.9.0) to c:\users\saikrishna\appdata\local\temp\pip-req-build-vo97_09w Building wheels for collected packages: yara-python Building wheel for yara-python (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\saikrishna\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\saikrishna\AppData\Local\Temp\pip-req-build-vo97_09w\setup.py'"'"'; file='"'"'C:\Users\saikrishna\AppData\Local\Temp\pip-req-build-vo97_09w\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\saikrishna\AppData\Local\Temp\pip-wheel-1iqnnywc' cwd: C:\Users\saikrishna\AppData\Local\Temp\pip-req-build-vo97_09w
Complete output (4 lines): running bdist_wheel running build running build_ext error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Failed building wheel for yara-python

I have installed Visual Studio build tools, all files are updated

Can anyone help me on this

skm248 avatar Aug 26 '20 13:08 skm248

@saikrishnameda248

Hi Bro, I had the same issue , found the solution at:

https://www.scivision.dev/python-windows-visual-c-14-required/

We need to install certain libraries.

bhandarisandeep avatar Sep 12 '20 17:09 bhandarisandeep