Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sbruno opened this issue Feb 25, 2019 · 14 comments
Open

Comments

@sbruno
Copy link

sbruno commented Feb 25, 2019

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.

@seanthegeek
Copy link

As a workaround you can do

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

To build the ltetest commit from git instead.

@buffer
Copy link

buffer commented Mar 15, 2019

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

@tomchop
Copy link

tomchop commented Mar 19, 2019

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))']

@sbruno
Copy link
Author

sbruno commented Mar 20, 2019

@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.

@seanthegeek
Copy link

seanthegeek commented Mar 21, 2019

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

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

@buffer
Copy link

buffer commented Mar 21, 2019

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.

@sbruno
Copy link
Author

sbruno commented Mar 21, 2019

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/yara-python@v3.9.0

@MrCrumbs
Copy link

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.

@seanthegeek
Copy link

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

@MrCrumbs
Copy link

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?

@seanthegeek
Copy link

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

@wesinator
Copy link
Contributor

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

@saikrishnameda248
Copy link

saikrishnameda248 commented Aug 26, 2020

Even after i added the yara-python line in requirements.txt getting below error
C:\Users\saikrishna>pip install git+https://github.com/VirusTotal/yara-python@v3.9.0
Collecting git+https://github.com/VirusTotal/yara-python@v3.9.0
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

@bhandarisandeep
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants