Pip install m2crypto error

Try to install the requirements: pip install -r requirements.txt Get the following error: ... _m2crypto_wrap.c SWIG/_m2crypto_wrap.c(3561): fatal error C1083: Cannot open include file: 'openssl...

Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the «Artifacts» tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.

I have also attached the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X. M2Crypto-0.35.2.win-amd64-py3.8.zip

However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:

  1. Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under «All Downloads» -> «Tools for Visual Studio 2019». This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
  2. In the installer, select «C++ Build Tools», install, and reboot if necessary.
  3. Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
  4. In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  5. Install swig with Chocolatey (in PowerShell). choco install -r -y swig
  6. Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
  7. Get the latest m2crypto code. If you have git installed, run git clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
  8. Use cd to change into the directory m2crypto was cloned/extracted to.
  9. Assuming python launches your desired Python interpreter version, run python setup.py build --openssl="C:Program FilesOpenSSL-Win64" --bundledlls, replacing C:Program FilesOpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
  10. Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
  11. Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.

Содержание

  1. pip install -U cuckoo fails at m2crypto (SWIG installed) #1705
  2. Comments
  3. Footer
  4. Installing M2Crypto Python Library on Windows Machine for Certificate Authentication
  5. Best Answer
  6. Comments
  7. M2cryoto error Linux #1223
  8. Comments
  9. benjaminrigaud / Swig generated code

pip install -U cuckoo fails at m2crypto (SWIG installed) #1705

When installing Cuckoo within venv, I receive an error message consistently which from hunting through previous bug queries and Google seems to suggest the lack of SWIG, which I have installed as per the installation guide (sudo apt-get install swig).

First error I see is Failed building wheel for m2crypto (which is then followed by Running setup.py clean for m2crypto)

Installer then quits with

error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

Command «/root/venv/bin/python2 -u -c «import setuptools, tokenize;file=’/tmp/pip-build-x_l1zN/m2crypto/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record /tmp/pip-xhU8pM-record/install-record.txt —single-version-externally-managed —compile —install-headers /root/venv/include/site/python2.7/m2crypto» failed with error code 1 in /tmp/pip-build-x_l1zN/m2crypto/

Anticipate it not being a bug, but I have installed the dependencies and followed the guidance (double checked), and would expect the pip installation to therefore work OK.

The text was updated successfully, but these errors were encountered:

Note I have tried to cater for non installed dependencies and have apt-get’d build-essential libssl-dev libffi-dev python-dev scholarly cryptopgraphy libjpeg-dev zliblg-dev swig

I have updated PIP and Python is version 2.7.13

I simply installed it as follows. Python is the same version as you.

Thanks for the comment hakawati. I have tried both commands to be sure, and swig is already installed and the most current version. m2crypto generates a very similar error and exits (although I had to leave the machine I was in, so do not have the full error to hand).

Interestingly, I exited venv to see whether installing in base system made any difference and instead of trying to install m2crypto it confirmed it was already present, when though I tried to reload
virtualenv venv I get a load of Python errors, so I am now of a view that that is the source of the issue.

Will do some more work and revert.

I am having the same output as @25zerotwo here.
System configuration is the following:

  • Debian 9 x64 up-to-date
  • python 2.7.13
  • virtualenv 15.0.1
  • pip 9.0.1
  • swig 3.0.10

I checked and double checked the installation guide without changes.

So if trying virtualenv venv I get

# virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /root/venv/bin/python2
Not overwriting existing python script /root/venv/bin/python (you must use /root/venv/bin/python2)
Installing setuptools, pkg_resources, pip, wheel. done.

Fairly sure it is virtuaenv that is the root cause of the issues we are seeing, I can pip install -U Cuckoo with no trouble at all.

Although it should work, please try to install a later version (atm that’d be pip install cuckoo==2.0.4a3 ). Since the 2.0.3 release we’ve got rid of requiring m2crypto by default. It’s barely used anyway.
Once we release a 2.0.4 version m2crypto will be completely optional.

In the end I got lazy and just installed outside of virtualenv which worked. But I’ll give that a go.

Hi,
use pip install m2crypto. it will install the newest version of m2crypto

THis works well, Thanks a lot

pip install m2crypto

What’s the problem? I installed swig on FreeBSD.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Installing M2Crypto Python Library on Windows Machine for Certificate Authentication

I’m running into a few errors trying to install M2Crypto on a windows machine. I’ve done a fair bit of research and it seems to be a common problem with the library.

Wondering if anyone here has experienced similar issues and resolved them? I’m using Win10(64 bit), Python 3.8 through Pycharm. Pip 20.1.1. I’ve tried to install both M2Crypto and M2CryptoWin64 but I’ve had no luck.

Best Answer

Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the «Artifacts» tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.

I have also attached the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X. M2Crypto-0.35.2.win-amd64-py3.8.zip

However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:

  1. Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under «All Downloads» -> «Tools for Visual Studio 2019». This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
  2. In the installer, select «C++ Build Tools», install, and reboot if necessary.
  3. Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
  4. In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))
  5. Install swig with Chocolatey (in PowerShell). choco install -r -y swig
  6. Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
  7. Get the latest m2crypto code. If you have git installed, run git clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
  8. Use cd to change into the directory m2crypto was cloned/extracted to.
  9. Assuming python launches your desired Python interpreter version, run python setup.py build —openssl=»C:Program FilesOpenSSL-Win64″ —bundledlls, replacing C:Program FilesOpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
  10. Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
  11. Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.

Try installing the attached library

Do you know how to change the path location when installing it? I want to put it in a venv.

Don’t worry, figured it out! Thanks again for your help mate

I’ve installed M2Crypto successfully but am now getting an error:

File «C:UsersUSERNAMEDesktopPATHanaplan_auth.py», line 13, in
from M2Crypto import EVP, RSA
File «C:UsersUSERNAMEDesktopPATHvenvlibsite-packagesM2Crypto__init__.py», line 22, in
import __m2crypto
ModuleNotFoundError: No module named ‘__m2crypto’

Have you ran into this error before? I’ve seen a few Google results with the same error for different things? Once I have this all setup I think I’ll create a wiki article for setting up Certificate Authentication on Windows systems.

I had the same issue with my virtual env

Unfortunately, I had to uninstall the whole python instance, get rid of the old M2Crypto library and then reinstall everything with the attached library.

I tried to uninstall and re-install but that hasn’t worked. I’m still getting the error:

File «C:UsersPATHTOFILESanaplan_auth.py», line 13, in
from M2Crypto import EVP, RSA
File «C:UsersPATHTOFILES\venvlibsite-packagesM2Crypto__init__.py», line 22, in
import __m2crypto
ModuleNotFoundError: No module named ‘__m2crypto’

But __m2crypto.py is in the same directory

You have to edit the script to say —
‘Import M2Crypto’

Strange, now I’m getting:

File «C:UsersSamDesktopData_Integration_Anaplananaplan_auth.py», line 13, in
from M2Crypto import EVP, RSA
File «C:UsersSamDesktopData_Integration_Anaplanvenvlibsite-packagesM2Crypto__init__.py», line 23, in
import m2
ModuleNotFoundError: No module named ‘m2’

There is an m2.py file in the directory though.

Hello Sam — I am running the same issue. Can you please specify steps help you to resolve this issue?

I haven’t resolved the issue yet. I was hoping that someone from Anaplan or the community might know.

I was going to try and revert to an older version of Python, maybe 3.5 or 3.7 and try a stable version of M2Crypto for that.

If you do happen to resolve the issue please let me know! 🙂

@anirudh @mendaye — I think I found the solution on Github: https://github.com/iOSForensics/pymobiledevice/issues/25 (the comment by user tech234a). Anaplan community should consider putting this information somewhere with better visibility.

Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the «Artifacts» tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.

I have also attached the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X. M2Crypto-0.35.2.win-amd64-py3.8.zip

Источник

M2cryoto error Linux #1223

Hey guys, I’m trying to figure out why Empire isn’t working for my kali Linux machine. I have both python2, and python3 installed, I did the “pip install -r requirements” no problems and did the install.sh.

After install and running ./empire it’s giving me the error M2crypto module «No module name __m2crypto,

After that when when trying to do “pip2 install m2crypto”, and «pip3 install m2crypto» it says its satisifed for both.
I’ve also tried deleting the entire empire folder and downloading from git again, and nothing.

Error:
Traceback (most recent call last):
File «./empire», line 13, in
from lib.common import empire, helpers
File «/root/Tricks/Empire/lib/common/empire.py», line 34, in
import agents
File «/root/Tricks/Empire/lib/common/agents.py», line 68, in
import encryption
File «/root/Tricks/Empire/lib/common/encryption.py», line 27, in
import M2Crypto
File «/usr/local/lib/python2.7/dist-packages/M2Crypto/init.py», line 22, in
import _m2crypto
File «/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py», line 17, in
__m2crypto = swig_import_helper()
File «/usr/local/lib/python2.7/dist-packages/M2Crypto/_m2crypto.py», line 16, in swig_import_helper
return importlib.import_module(‘__m2crypto’)
File «/usr/lib/python2.7/importlib/init.py», line 37, in import_module
import(name)
ImportError: No module named __m2crypto

Anyone have any ideas.

The text was updated successfully, but these errors were encountered:

Источник

benjaminrigaud / Swig generated code

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

mkvirtualenv -p

/pypy-2.5.1-linux64/bin/pypy pypy-m2crypto

pip install M2Crypto==0.22.3
touch empty
python -c » from M2Crypto import m2; f = open(’empty’, ‘rb’); m2.bio_new_fp(f, 0) «

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

Fatal error in cpyext, CPython compatibility layer, calling PyFile_AsFile
Either report a bug or consider not using this particular extension
RPython traceback:
File «pypy_module_cpyext_pyobject.c», line 490, in make_ref
File «rpython_rtyper_lltypesystem_rordereddict.c», line 423, in ll_dict_getitem__dicttablePtr_objectPtr
Segmentation fault (core dumped)

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

Источник

samlambert

Hi guys,

I’m running into a few errors trying to install M2Crypto on a windows machine. I’ve done a fair bit of research and it seems to be a common problem with the library.

Wondering if anyone here has experienced similar issues and resolved them? I’m using Win10(64 bit), Python 3.8 through Pycharm. Pip 20.1.1. I’ve tried to install both M2Crypto and M2CryptoWin64 but I’ve had no luck.

Cheers

0

Best Answer

  • samlambert

    Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the «Artifacts» tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.

    I have also attached the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X. M2Crypto-0.35.2.win-amd64-py3.8.zip

    However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:

    1. Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under «All Downloads» -> «Tools for Visual Studio 2019». This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
    2. In the installer, select «C++ Build Tools», install, and reboot if necessary.
    3. Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
    4. In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))
    5. Install swig with Chocolatey (in PowerShell). choco install -r -y swig
    6. Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
    7. Get the latest m2crypto code. If you have git installed, run git clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
    8. Use cd to change into the directory m2crypto was cloned/extracted to.
    9. Assuming python launches your desired Python interpreter version, run python setup.py build —openssl=»C:Program FilesOpenSSL-Win64″ —bundledlls, replacing C:Program FilesOpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
    10. Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
    11. Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.

    1

Comments

  • anirudh

    Hi Sam,

    Try installing the attached library

    Regards,

    Anirudh

    1

  • samlambert

    Thanks @anirudh!

    Do you know how to change the path location when installing it? I want to put it in a venv.

    Cheers

    0

  • samlambert

    Don’t worry, figured it out! Thanks again for your help mate

    Cheers

    0

  • samlambert

    Hi @anirudh 

    I’ve installed M2Crypto successfully but am now getting an error:

    File «C:UsersUSERNAMEDesktopPATHanaplan_auth.py», line 13, in <module>
    from M2Crypto import EVP, RSA
    File «C:UsersUSERNAMEDesktopPATHvenvlibsite-packagesM2Crypto__init__.py», line 22, in <module>
    import __m2crypto
    ModuleNotFoundError: No module named ‘__m2crypto’

    Have you ran into this error before? I’ve seen a few Google results with the same error for different things? Once I have this all setup I think I’ll create a wiki article for setting up Certificate Authentication on Windows systems.

    1

  • anirudh

    Hi Sam,

    I had the same issue with my virtual env

    Unfortunately, I had to uninstall the whole python instance, get rid of the old M2Crypto library and then reinstall everything with the attached library…..

    Regards,

    Anirudh

    0

  • samlambert

    I tried to uninstall and re-install but that hasn’t worked. I’m still getting the error:

    File «C:UsersPATHTOFILESanaplan_auth.py», line 13, in <module>
    from M2Crypto import EVP, RSA
    File «C:UsersPATHTOFILES\venvlibsite-packagesM2Crypto__init__.py», line 22, in <module>
    import __m2crypto
    ModuleNotFoundError: No module named ‘__m2crypto’

    But __m2crypto.py is in the same directory

    0

  • anirudh

    Hey Sam,

    You have to edit the script to say —
    ‘Import M2Crypto’

    not __m2crypto

    Regards,
    Anirudh

    0

  • samlambert

    Strange, now I’m getting:

    File «C:UsersSamDesktopData_Integration_Anaplananaplan_auth.py», line 13, in <module>
    from M2Crypto import EVP, RSA
    File «C:UsersSamDesktopData_Integration_Anaplanvenvlibsite-packagesM2Crypto__init__.py», line 23, in <module>
    import m2
    ModuleNotFoundError: No module named ‘m2’

    There is an m2.py file in the directory though.

    0

  • mendaye

    Hello Sam — I am running the same issue. Can you please specify steps help you to resolve this issue?

    Regards

    Suraphel

    0

  • samlambert

    I haven’t resolved the issue yet. I was hoping that someone from Anaplan or the community might know. 

    I was going to try and revert to an older version of Python, maybe 3.5 or 3.7 and try a stable version of M2Crypto for that.

    If you do happen to resolve the issue please let me know! 🙂

    0

  • samlambert

    @anirudh @mendaye — I think I found the solution on Github: https://github.com/iOSForensics/pymobiledevice/issues/25 (the comment by user tech234a). Anaplan community should consider putting this information somewhere with better visibility.

    Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the «Artifacts» tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.

    I have also attached the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X. M2Crypto-0.35.2.win-amd64-py3.8.zip

    However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:

    1. Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under «All Downloads» -> «Tools for Visual Studio 2019». This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
    2. In the installer, select «C++ Build Tools», install, and reboot if necessary.
    3. Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
    4. In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))
    5. Install swig with Chocolatey (in PowerShell). choco install -r -y swig
    6. Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
    7. Get the latest m2crypto code. If you have **** installed, run **** clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
    8. Use cd to change into the directory m2crypto was cloned/extracted to.
    9. Assuming python launches your desired Python interpreter version, run python setup.py build —openssl=»C:Program FilesOpenSSL-Win64″ —bundledlls, replacing C:Program FilesOpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
    10. Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
    11. Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.

    0

Categories

  • 225 All Categories
  • 8.5K Forums
  • 8.5K Anaplan platform discussions
  • 365 Programs
  • 891 Resources
  • 96 Connections
  • 3.2K Idea Exchange
  • 1.4K Academy
  • 6 Platform updates
  • 73 Anaplan Japan Community
Skip to content



Open


Issue created Nov 06, 2017 by Tim Roadley@TimRoadley

«sudo pip install M2Crypto fails» on Mac OSX High Sierra

Tims-MacBook-Pro:M2Crypto-0.27.0 Timbo$ sudo pip install M2Crypto
Password:
The directory '/Users/Timbo/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Timbo/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting M2Crypto
  Downloading M2Crypto-0.27.0.tar.gz (1.1MB)
    100% |████████████████████████████████| 1.1MB 1.0MB/s 
Requirement already satisfied: typing in /Library/Python/2.7/site-packages (from M2Crypto)
Installing collected packages: M2Crypto
  Running setup.py install for M2Crypto ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-UmYepS/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-W3DEiQ-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    copying M2Crypto/callback.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/EVP.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/AuthCookie.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/m2.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/ftpslib.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/EC.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/httpslib.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/X509.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/util.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/RSA.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/BIO.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/DH.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/__init__.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/threading.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/Rand.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/SMIME.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/Engine.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/m2xmlrpclib.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/RC4.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/m2urllib2.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/DSA.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/six.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/m2urllib.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/BN.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/m2crypto.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/Err.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    copying M2Crypto/ASN1.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto
    creating build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/cb.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Session.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/timeout.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/__init__.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Cipher.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Connection.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Context.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/SSLServer.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Checker.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/SSL
    creating build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/PublicKeyRing.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/RSA.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/constants.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/__init__.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/packet.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    copying M2Crypto/PGP/PublicKey.py -> build/lib.macosx-10.13-intel-2.7/M2Crypto/PGP
    running build_ext
    building 'M2Crypto._m2crypto' extension
    creating build/temp.macosx-10.13-intel-2.7
    creating build/temp.macosx-10.13-intel-2.7/SWIG
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/private/tmp/pip-build-UmYepS/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.macosx-10.13-intel-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations
    SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (PyType_Ready(tp) < 0)
            ^~~~~~~~~~~~~~~~~~~~
    SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
      return res;
             ^~~
    SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
        if (PyType_Ready(tp) < 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~
    SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
      int res;
             ^
              = 0
    SWIG/_m2crypto_wrap.c:3554:10: fatal error: 'openssl/err.h' file not found
    #include <openssl/err.h>
             ^~~~~~~~~~~~~~~
    1 warning and 1 error generated.
    error: command 'cc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-UmYepS/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-W3DEiQ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-UmYepS/M2Crypto/

Edited Nov 07, 2017 by Matěj Cepl

Building wheels for collected packages: M2Crypto, pycrypto
  Building wheel for M2Crypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dCCequ          
       cwd: /tmp/pip-install-wMjfxq/M2Crypto/                                   
  Complete output (52 lines):                                                   
  running bdist_wheel                                                           
  running build                                                                 
  running build_py                                                              
  copying M2Crypto/callback.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/Rand.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto            
  copying M2Crypto/Err.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/RSA.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-2.7/M2Crypto              
  copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-2.7/M2Crypto         
  copying M2Crypto/m2.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/EC.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-2.7/M2Crypto        
  copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/util.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/DSA.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/RC4.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/Engine.py -> build/lib.linux-x86_64-2.7/M2Crypto             
  copying M2Crypto/BN.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-2.7/M2Crypto          
  copying M2Crypto/six.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/X509.py -> build/lib.linux-x86_64-2.7/M2Crypto               
  copying M2Crypto/EVP.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/BIO.py -> build/lib.linux-x86_64-2.7/M2Crypto                
  copying M2Crypto/DH.py -> build/lib.linux-x86_64-2.7/M2Crypto                 
  copying M2Crypto/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto           
  copying M2Crypto/threading.py -> build/lib.linux-x86_64-2.7/M2Crypto          
  creating build/lib.linux-x86_64-2.7/M2Crypto/SSL                              
  copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                      
  copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL         
  copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL     
  copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL    
  copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                              
  copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
  copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL 
  copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL   
  running build_ext                                                             
  building 'M2Crypto._m2crypto' extension                                       
  creating build/temp.linux-x86_64-2.7                                          
  creating build/temp.linux-x86_64-2.7/SWIG                                     
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/tmp/pip-install-wMjfxq/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING       
  SWIG/_m2crypto_wrap.c:127:10: fatal error: Python.h: Нет такого файла или каталога                                                                             
    127 | #include <Python.h>                                                   
        |          ^~~~~~~~~~                                                   
  compilation terminated.                                                       
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1               
  ----------------------------------------                                      
  ERROR: Failed building wheel for M2Crypto
  Running setup.py clean for M2Crypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-G5Fe32          
       cwd: /tmp/pip-install-wMjfxq/pycrypto/                                   
  Complete output (212 lines):                                                  
  running bdist_wheel                                                           
  running build                                                                 
  running build_py                                                              
  creating build                                                                
  creating build/lib.linux-x86_64-2.7                                           
  creating build/lib.linux-x86_64-2.7/Crypto                                    
  copying lib/Crypto/pct_warnings.py -> build/lib.linux-x86_64-2.7/Crypto       
  copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-2.7/Crypto           
  creating build/lib.linux-x86_64-2.7/Crypto/Hash                               
  copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/MD4.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/Hash   
  copying lib/Crypto/Hash/hashalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Hash 
  copying lib/Crypto/Hash/HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/Hash     
  copying lib/Crypto/Hash/MD5.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/SHA.py -> build/lib.linux-x86_64-2.7/Crypto/Hash      
  copying lib/Crypto/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Hash 
  creating build/lib.linux-x86_64-2.7/Crypto/Cipher                             
  copying lib/Crypto/Cipher/AES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/blockalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                             
  copying lib/Crypto/Cipher/Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                              
  copying lib/Crypto/Cipher/PKCS1_OAEP.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                            
  copying lib/Crypto/Cipher/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                            
  copying lib/Crypto/Cipher/DES3.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/CAST.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  copying lib/Crypto/Cipher/DES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher                                                                              
  copying lib/Crypto/Cipher/XOR.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher  
  copying lib/Crypto/Cipher/ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher 
  creating build/lib.linux-x86_64-2.7/Crypto/Util                               
  copying lib/Crypto/Util/py21compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/randpool.py -> build/lib.linux-x86_64-2.7/Crypto/Util 
  copying lib/Crypto/Util/number.py -> build/lib.linux-x86_64-2.7/Crypto/Util   
  copying lib/Crypto/Util/asn1.py -> build/lib.linux-x86_64-2.7/Crypto/Util     
  copying lib/Crypto/Util/Counter.py -> build/lib.linux-x86_64-2.7/Crypto/Util  
  copying lib/Crypto/Util/RFC1751.py -> build/lib.linux-x86_64-2.7/Crypto/Util  
  copying lib/Crypto/Util/_number_new.py -> build/lib.linux-x86_64-2.7/Crypto/Util                                                                               
  copying lib/Crypto/Util/py3compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Util 
  creating build/lib.linux-x86_64-2.7/Crypto/Random                             
  copying lib/Crypto/Random/random.py -> build/lib.linux-x86_64-2.7/Crypto/Random
  copying lib/Crypto/Random/_UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/Random                                                                      
  copying lib/Crypto/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random                                                                              
  creating build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                     
  copying lib/Crypto/Random/Fortuna/FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                      
  copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                    
  copying lib/Crypto/Random/Fortuna/SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                               
  copying lib/Crypto/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna                                                              
  creating build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                       
  copying lib/Crypto/Random/OSRNG/rng_base.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/fallback.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/nt.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                        
  copying lib/Crypto/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                  
  copying lib/Crypto/Random/OSRNG/posix.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG                                                                     
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest                           
  copying lib/Crypto/SelfTest/st_common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest                                                                         
  copying lib/Crypto/SelfTest/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest                                                                          
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                    
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                     
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                       
  copying lib/Crypto/SelfTest/Cipher/test_DES3.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/test_ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/test_DES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                       
  copying lib/Crypto/SelfTest/Cipher/test_AES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                              
  copying lib/Crypto/SelfTest/Cipher/test_XOR.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  copying lib/Crypto/SelfTest/Cipher/test_CAST.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                           
  copying lib/Crypto/SelfTest/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher                                                            
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                      
  copying lib/Crypto/SelfTest/Hash/test_HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                               
  copying lib/Crypto/SelfTest/Hash/test_SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_MD5.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                  
  copying lib/Crypto/SelfTest/Hash/test_SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_MD4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/test_SHA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                             
  copying lib/Crypto/SelfTest/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  copying lib/Crypto/SelfTest/Hash/test_MD2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash                                                                
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                  
  copying lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                               
  copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                    
  copying lib/Crypto/SelfTest/Protocol/test_chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                   
  copying lib/Crypto/SelfTest/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                        
  copying lib/Crypto/SelfTest/Protocol/test_KDF.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol                                                        
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                 
  copying lib/Crypto/SelfTest/PublicKey/test_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  copying lib/Crypto/SelfTest/PublicKey/test_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  copying lib/Crypto/SelfTest/PublicKey/test_importKey.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                
  copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                  
  copying lib/Crypto/SelfTest/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                    
  copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                    
  copying lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                               
  copying lib/Crypto/SelfTest/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                            
  copying lib/Crypto/SelfTest/Random/test_random.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random                                                         
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna            
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                               
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                             
  copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                                        
  copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna                                            
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG              
  copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                              
  copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                                 
  copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                            
  copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                          
  copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                                
  copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG                                           
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                      
  copying lib/Crypto/SelfTest/Util/test_asn1.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                               
  copying lib/Crypto/SelfTest/Util/test_number.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                             
  copying lib/Crypto/SelfTest/Util/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                          
  copying lib/Crypto/SelfTest/Util/test_Counter.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                            
  copying lib/Crypto/SelfTest/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util                                                                
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                 
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                 
  copying lib/Crypto/SelfTest/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/Protocol                           
  copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                               
  copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                          
  copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                          
  copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol                                                                      
  creating build/lib.linux-x86_64-2.7/Crypto/PublicKey                          
  copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                             
  copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                         
  copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                          
  copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                            
  copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                            
  copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                             
  copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                       
  copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey                                                                        
  creating build/lib.linux-x86_64-2.7/Crypto/Signature                          
  copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                      
  copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                       
  copying lib/Crypto/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Signature                                                                        
  running build_ext                                                             
  running build_configure                                                       
  checking for gcc... gcc                                                       
  checking whether the C compiler works... yes                                  
  checking for C compiler default output file name... a.out                     
  checking for suffix of executables...                                         
  checking whether we are cross compiling... no                                 
  checking for suffix of object files... o                                      
  checking whether we are using the GNU C compiler... yes                       
  checking whether gcc accepts -g... yes                                        
  checking for gcc option to accept ISO C89... none needed                      
  checking for __gmpz_init in -lgmp... yes                                      
  checking for __gmpz_init in -lmpir... no                                      
  checking whether mpz_powm is declared... yes                                  
  checking whether mpz_powm_sec is declared... yes                              
  checking how to run the C preprocessor... gcc -E                              
  checking for grep that handles long lines and -e... /usr/bin/grep             
  checking for egrep... /usr/bin/grep -E                                        
  checking for ANSI C header files... yes                                       
  checking for sys/types.h... yes                                               
  checking for sys/stat.h... yes                                                
  checking for stdlib.h... yes                                                  
  checking for string.h... yes                                                  
  checking for memory.h... yes                                                  
  checking for strings.h... yes                                                 
  checking for inttypes.h... yes                                                
  checking for stdint.h... yes                                                  
  checking for unistd.h... yes                                                  
  checking for inttypes.h... (cached) yes                                       
  checking limits.h usability... yes                                            
  checking limits.h presence... yes                                             
  checking for limits.h... yes                                                  
  checking stddef.h usability... yes                                            
  checking stddef.h presence... yes                                             
  checking for stddef.h... yes                                                  
  checking for stdint.h... (cached) yes                                         
  checking for stdlib.h... (cached) yes                                         
  checking for string.h... (cached) yes                                         
  checking wchar.h usability... yes                                             
  checking wchar.h presence... yes                                              
  checking for wchar.h... yes                                                   
  checking for inline... inline                                                 
  checking for int16_t... yes                                                   
  checking for int32_t... yes                                                   
  checking for int64_t... yes                                                   
  checking for int8_t... yes                                                    
  checking for size_t... yes                                                    
  checking for uint16_t... yes                                                  
  checking for uint32_t... yes                                                  
  checking for uint64_t... yes                                                  
  checking for uint8_t... yes                                                   
  checking for stdlib.h... (cached) yes                                         
  checking for GNU libc compatible malloc... yes                                
  checking for memmove... yes                                                   
  checking for memset... yes                                                    
  configure: creating ./config.status                                           
  config.status: creating src/config.h                                          
  building 'Crypto.PublicKey._fastmath' extension                               
  creating build/temp.linux-x86_64-2.7                                          
  creating build/temp.linux-x86_64-2.7/src                                      
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o                                              
  src/_fastmath.c:31:10: fatal error: Python.h: Нет такого файла или каталога   
     31 | #include "Python.h"                                                   
        |          ^~~~~~~~~~                                                   
  compilation terminated.                                                       
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1               
  ----------------------------------------                                      
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build M2Crypto pycrypto
Installing collected packages: M2Crypto, pyminifier, xlwt, xlrd, xlutils, pycrypto
    Running setup.py install for M2Crypto ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-VErJNw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/M2Crypto                                              
         cwd: /tmp/pip-install-wMjfxq/M2Crypto/                                 
    Complete output (55 lines):                                                 
    running install                                                             
    running build                                                               
    running build_py                                                            
    creating build                                                              
    creating build/lib.linux-x86_64-2.7                                         
    creating build/lib.linux-x86_64-2.7/M2Crypto                                
    copying M2Crypto/callback.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/Rand.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto          
    copying M2Crypto/Err.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/RSA.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-2.7/M2Crypto            
    copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-2.7/M2Crypto       
    copying M2Crypto/m2.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/EC.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-2.7/M2Crypto      
    copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/util.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/DSA.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/RC4.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/Engine.py -> build/lib.linux-x86_64-2.7/M2Crypto           
    copying M2Crypto/BN.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-2.7/M2Crypto        
    copying M2Crypto/six.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/X509.py -> build/lib.linux-x86_64-2.7/M2Crypto             
    copying M2Crypto/EVP.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/BIO.py -> build/lib.linux-x86_64-2.7/M2Crypto              
    copying M2Crypto/DH.py -> build/lib.linux-x86_64-2.7/M2Crypto               
    copying M2Crypto/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto         
    copying M2Crypto/threading.py -> build/lib.linux-x86_64-2.7/M2Crypto        
    creating build/lib.linux-x86_64-2.7/M2Crypto/SSL                            
    copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                    
    copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL       
    copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL   
    copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL  
    copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL                                                                            
    copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL
    copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-2.7/M2Crypto/SSL 
    running build_ext                                                           
    building 'M2Crypto._m2crypto' extension                                     
    creating build/temp.linux-x86_64-2.7                                        
    creating build/temp.linux-x86_64-2.7/SWIG                                   
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-uC7NI8/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -I/tmp/pip-install-wMjfxq/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-2.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING     
    SWIG/_m2crypto_wrap.c:127:10: fatal error: Python.h: Нет такого файла или каталога                                                                           
      127 | #include <Python.h>                                                 
          |          ^~~~~~~~~~                                                 
    compilation terminated.                                                     
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1             
    ----------------------------------------                                    
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wMjfxq/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-VErJNw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/M2Crypto Check the logs for full command output.                                                      
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
cat: /etc/lsb-release: Нет такого файла или каталога
ls: невозможно получить доступ к '/opt/microsoft/powershell/*/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY': Нет такого файла или каталога

Я пытаюсь установить пакет Python M2Crypto в virtualenv на машине x86_64 RHEL 6.1. Этот процесс вызывает swig, который не выполняется со следующей ошибкой:

$ virtualenv -q --no-site-packages venv
$ pip install -E venv M2Crypto==0.20.2
Downloading/unpacking M2Crypto==0.20.2
  Downloading M2Crypto-0.20.2.tar.gz (412Kb): 412Kb  downloaded
  Running setup.py egg_info for package M2Crypto
Installing collected packages: M2Crypto
  Running setup.py install for M2Crypto
    building 'M2Crypto.__m2crypto' extension
    swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
    swig -python -I/usr/include/python2.6 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
    /usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.
    error: command 'swig' failed with exit status 1
    Complete output from command /home/lorin/venv/bin/python -c "import setuptools;__file__='/home/lorin/venv/build/M2Crypto/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-BFiNtU-record/install-record.txt --install-headers /home/lorin/venv/include/site/python2.6:

У меня установлен OpenSSL 1.0.0 через пакеты RPM от RedHat.

Часть/usr/include/openssl/opensslconf.h, которая вызывает ошибку, выглядит следующим образом:

#if defined(__i386__)
#include "opensslconf-i386.h"
#elif defined(__ia64__)
#include "opensslconf-ia64.h"
#elif defined(__powerpc64__)
#include "opensslconf-ppc64.h"
#elif defined(__powerpc__)
#include "opensslconf-ppc.h"
#elif defined(__s390x__)
#include "opensslconf-s390x.h"
#elif defined(__s390__)
#include "opensslconf-s390.h"
#elif defined(__sparc__) && defined(__arch64__)
#include "opensslconf-sparc64.h"
#elif defined(__sparc__)
#include "opensslconf-sparc.h"
#elif defined(__x86_64__)
#include "opensslconf-x86_64.h"
#else
#error "This openssl-devel package does not work your architecture?"
#endif

gcc имеет правую переменную:

$ echo | gcc -E -dM - | grep x86_64
#define __x86_64 1
#define __x86_64__ 1

Но призрачный свинг не делает, так как это строка, которая не работает:

swig -python -I/usr/include/python2.6 -I/usr/include -includeall -o 
  SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i

Есть ли способ исправить это, изменив что-то в моей конфигурации системы? M2Crypto устанавливается в virtualenv как часть более крупного script, который я не контролирую, поэтому избегать обманывания файлов M2Crypto было бы хорошо.

Понравилась статья? Поделить с друзьями:
  • Ping target via firehose error miflash
  • Pip install logging error
  • Ping system error linux
  • Pickit2 vdd voltage level error
  • Pip install invalid syntax python ошибка