Skip to content

pip install gpg==1.10.0 not working on Windows #6960

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

Closed
Siddharthk opened this issue Sep 2, 2019 · 9 comments
Closed

pip install gpg==1.10.0 not working on Windows #6960

Siddharthk opened this issue Sep 2, 2019 · 9 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: wrong project Should be reported elsewhere type: support User Support

Comments

@Siddharthk
Copy link

Siddharthk commented Sep 2, 2019

Environment
Windows

  • pip version:
    C:\Users\sid>pip --version
    pip 19.2.3 from c:\users\sid\appdata\local\programs\python\python36\lib\site-packages\pip (python 3.6)
  • Python version:
    Python 3.6
  • OS:
    Windows

Description
pip install gpg==1.10.0 not working on Windows.

Expected behavior
Package gpg should be installed.

How to Reproduce
Getting below error even after installing libgpgme-devel on cygwin:

$ pip install gpg

Collecting gpg

Using cached https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\skherada\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\cygwin64\\tmp\\pip-install-l1bsdhoa\\gpg\\setup.py'"'"'; __file__='"'"'C:\\cygwin64\\tmp\\pip-install-l1bsdhoa\\gpg\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
       cwd: C:\cygwin64\tmp\pip-install-l1bsdhoa\gpg\
  Complete output (1 lines):
  Could not find gpgme-config.  Please install the libgpgme development package.
  ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

$ gpgme-config --version
1.9.0

Also tried Installing libgpgme-devel using msys2...still same error.

C:\Users\sid>pip install gpg
Collecting gpg
  Using cached https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\sid\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sid\\AppData\\Local\\Temp\\pip-install-8uijpv2i\\gpg\\setup.py'"'"'; __file__='"'"'C:\\Users\\sid\\AppData\\Local\\Temp\\pip-install-8uijpv2i\\gpg\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\sid\AppData\Local\Temp\pip-install-8uijpv2i\gpg\
    Complete output (1 lines):
    Could not find gpgme-config.  Please install the libgpgme development package.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Can someone please help me with this. I am having python 3.6 version.

@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Sep 2, 2019
@chrahunt chrahunt added resolution: wrong project Should be reported elsewhere S: awaiting response Waiting for a response/more information type: support User Support labels Sep 2, 2019
@ghost ghost removed the S: needs triage Issues/PRs that need to be triaged label Sep 2, 2019
@chrahunt
Copy link
Member

chrahunt commented Sep 2, 2019

Hi @Siddharthk. This looks like an issue specific to the gpg project itself. Per the README, one place to get help would be to send an email to the mailing list: https://lists.gnupg.org/mailman/listinfo/gnupg-users. You may also post on a general user help site like superuser.com.

One hint that may help you: The setup.py in gpg that is raising this exception is trying to execute gpgme-config --thread=pthread --version. The install will fail until you can execute that without any errors.

I will leave this open for a bit in case you have concerns. I would really suggest reaching out to one of the gpg support avenues I mentioned above.

@Siddharthk
Copy link
Author

@chrahunt Below is the output for your command:

[skherada.II01-5XP38S2] ➤ gpgme-config --thread=pthread --version
1.13.1-unknown

I tried creating bug on gpg project but they closed it.
https://dev.gnupg.org/T4693

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Sep 2, 2019
@Siddharthk
Copy link
Author

Siddharthk commented Sep 2, 2019

@chrahunt For more information, I tried below things with no luck:

  1. Tried on Windows 7/8/10
  2. Used msys2 to install libgpgme-devel.
  3. Used cygwin/MobaXterm to install libgpgme-devel.

All of the above result is same below issue:


[skherada.II01-5XP38S2] ➤ pip install gpg
Collecting gpg
  Using cached https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\skherada\appdata\local\programs\python\python36\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\skherada\\AppData\\Local\\Temp\\Mxt104\\tmp\\pip-install-veccpms5\\gpg\\setup.py'"'"'; __file__='"'"'C:\\Users\\skherada\\AppData\\Local\\Temp\\Mxt104\\tmp\\pip-install-veccpms5\\gpg\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\skherada\AppData\Local\Temp\Mxt104\tmp\pip-install-veccpms5\gpg\
    Complete output (1 lines):
    Could not find gpgme-config.  Please install the libgpgme development package.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Really appreciate if someone can help me out.

@chrahunt
Copy link
Member

chrahunt commented Sep 2, 2019

I would not mix a Windows-installed Python with msys2 or Cygwin, since it may give confusing results like this.

If you use can use Windows 10 only, then Windows Subsystem for Linux would be a good option. If you install one of the distributions mentioned here (for example, Ubuntu) then you should be able to follow any instructions for that distribution to get the library working. Just make sure you use a Python installed in the WSL environment, not the Windows-installed Python.

@Siddharthk
Copy link
Author

@chrahunt I was just trying out different windows environments. I can't use windows 10 since my office PC has windows 7. I was not able to find a way to install libgpgme-devel package without using cygwin or msys2. Am I missing something here?

@chrahunt
Copy link
Member

chrahunt commented Sep 2, 2019

Installing the libgpgme-devel package is advice given for a Unix-like environment. On Windows the advice would be different, but I don't know what that is. ☹️

You may use gpg.exe directly (as installed using the Gpg4win installer) with subprocess or find a different library. That's really all I can think to try at this point.

I would definitely post your query in a general support forum as mentioned above, you'll get a wider audience there who may have better advice.

@chrahunt chrahunt added the S: awaiting response Waiting for a response/more information label Sep 2, 2019
@Siddharthk
Copy link
Author

@chrahunt Was not able to make it work in Windows...using ubuntu in vagrant to solve the issue. Maybe pip needs to install gpg differently in windows...not sure though.

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Sep 6, 2019
@chrahunt
Copy link
Member

chrahunt commented Sep 6, 2019

Glad you were able to find a way. It can be tough using packages with external requirements, especially on Windows. In this case pip is doing everything it can, it all comes down to what is in the setup.py for the gpg package.

@chrahunt
Copy link
Member

chrahunt commented Sep 6, 2019

Since you've found a workaround I'll close this, but please let us know if you have any other issues. Thanks!

@chrahunt chrahunt closed this as completed Sep 6, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: wrong project Should be reported elsewhere type: support User Support
Projects
None yet
Development

No branches or pull requests

2 participants