Python-2.7.18: cryptography-3.3.2 module installation from source failed - python-2.7

I need to install custom module of cryptography#3.3.2 with python-2.7.18 on Ubuntu-18.04, on installation from source got below error
build/temp.linux-x86_64-2.7/_openssl.c: In function '_cffi_d_i2d_re_X509_REQ_tbs':
build/temp.linux-x86_64-2.7/_openssl.c:50709:10: warning: implicit declaration of function 'i2d_re_X509_REQ_tbs'; did you mean 'i2d_re_X509_tbs'? [-Wimplicit-function-declaration]
return i2d_re_X509_REQ_tbs(x0, x1);
^~~~~~~~~~~~~~~~~~~
i2d_re_X509_tbs
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
=============================DEBUG ASSISTANCE=============================
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Current pip version is : pip 20.3.4 (latest supported)
openssl version : OpenSSL 1.1.1
Also all required dependencies are installed.
If
pip install cryptography is done it successfully installs 3.3.2 version.
Kindly suggest.
I tried to install all dependencies but did not solved my problem.
Also attempted to install non patched cryptography-3.3.2 module from source but got the same error.

Related

Airflow 1.10.13, 2020-11-24 issues after update with pip install

Below is the configuration which worked till December 1st
composer-1.11.2-airflow-1.10.6
Python – 3.6
'dbt==0.17.0',
'google-cloud-storage',
'google-cloud-secret-manager==1.0.0',
'protobuf==3.12.2'
With the above configuration we are observing below error.
ERROR: Cannot install dbt and protobuf==3.12.2 because these package versions have conflicting dependencies.\n\nThe conflict is caused by:\n The user requested protobuf==3.12.2\n dbt-bigquery 0.17.0 depends on protobuf<3.12 and >=3.6.0\n\nTo fix this you could try to:\n1. loosen the range of package versions you've specified\n2. remove package versions to allow pip attempt to solve the dependency conflict\n\nERROR: ResolutionImpossible
Post receiving this error message we have tried many version changes to resolve the above issue. Below listed are few of the fixes applied and errors we have observed for those fixes.
Fix applied: downgraded protobuf version from 3.12.2 to 3.11.3 as per the above error
Error: Requested docutils<0.16,>=0.10 from https://files.pythonhosted.org/packages/d4/12/6c3fd74a590c7327c98cae008c11d536029fa9cd7924de477e8cb8804186/docutils-0.15.1-post1.tar.gz#sha256=f33ddb723332c6d6b6d99731ee1fc0c35eb4044a2df5cca1c64c8aa78eaf22cb (from botocore<1.15,>=1.5.0->dbt-redshift==0.17.0->dbt==0.17.0) has different version in metadata: '0.15.1'
Fix applied: Specified docutils version to 0.15.2 as to fix the above error
Error: SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Generating %s..." % output)?\n ----------------------------------------\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Fix applied: Tried upgrading python version from 3.6 to 3.8.
Error: The path python3.8 (from --python=python3.8) does not exist.
Fix applied: Removed package versioning for above libraries to allow pip attempt to solve the dependency conflict.
Error: Command errored out with exit status 1:\n command: /tmp/venv__vuo821/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ghz6thkq/protobuf_a5303ec5c2df4986bb9b05948ae30052/setup.py'"'"'; file='"'"'/tmp/pip-install-ghz6thkq/protobuf_a5303ec5c2df4986bb9b05948ae30052/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 /tmp/pip-pip-egg-info-gi38587q\n cwd: /tmp/pip-install-ghz6thkq/protobuf_a5303ec5c2df4986bb9b05948ae30052/\n Complete output (6 lines):\n Traceback (most recent call last):\n File "", line 1, in \n File "/tmp/pip-install-ghz6thkq/protobuf_a5303ec5c2df4986bb9b05948ae30052/setup.py", line 52\n print "Generating %s..." % output\n ^\n SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Generating %s..." % output)?\n ----------------------------------------\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
Fix applied: Upgraded dbt to 0.17.2
Error: Received SIGTERM. Terminating subprocesses.
Fix applied: Tried downgrading setuptools version to 49.6.0
Error: SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Generating %s..." % output)?\n ------------------------------- ---------\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Fix applied: upgraded Composer and Airflow versions to composer-1.13.2-airflow-1.10.9
Error: Got similar errors with above configuration combinations
Which pip version are you using? If you upgrade pip to a newer version, please note that the dependency resolution algo has fundamentally changed since pip#20.3: https://pip.pypa.io/en/stable/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020.
Backtracking will happen to ensure there are no conflict dependencies: https://pip.pypa.io/en/stable/user_guide/#dependency-resolution-backtracking.
Stick to an older pip version (<20) may work in your case

Error installing pymvpa2 with pip

I'm trying to install pymvpa2 in Python 2.7. using pip. I successfully installed other required modules, but I can't install pymvpa2 (I use Python 2.7 and Windows 10).
Also, I downloaded swig, but I keep getting the same error message:
C:\WINDOWS\system32>cd "C:\Python27\Scripts"
C:\Python27\Scripts>pip install pymvpa2
Collecting pymvpa2
Using cached pymvpa2-2.6.1.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
running build_src
build_src
building extension "mvpa2.clfs.libsmlrc.smlrc" sources
building extension "mvpa2.clfs.libsvmc._svmc" sources
creating build
creating build\src.win32-2.7
creating build\src.win32-2.7\mvpa2
creating build\src.win32-2.7\mvpa2\clfs
creating build\src.win32-2.7\mvpa2\clfs\libsvmc
swig.exe++: mvpa2\clfs\libsvmc\svmc.i
swig.exe -python -I3rd\libsvm -c++ -I3rd\libsvm -o build\src.win32-2.7\mvpa2\clfs\libsvmc\svmc_wrap.cpp -outdir build\src.win32-2.7\mvpa2\clfs\libsvmc mvpa2\clfs\libsvmc\svmc.i
error: command 'swig.exe' failed: No such file or directory
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\MYCOM\appdata\local\temp\pip-build-uiyfnt\pymvpa2\
Thank you in advance for helping me out!!
pip complains about not finding "swig.exe". Have you checked that you can execute "swig.exe" from the terminal? Simply typing swig or swig.exe should help you find this out. When a command-line program is installed successfully, you can simply type its name in a terminal and it should start.
If swig is not available by this methods, check their special page to get you started on windows: http://www.swig.org/Doc3.0/Windows.html

Makefile error raspberry-pi 3

I have an issue with Codelite compilation, running on raspbian jessie - these are the (known) steps I have taken to produce it.
First I installed Codelite with apt-get install Codelite, then produced a c++ project.
When running build project I get the error:
/bin/sh -c ' -j 4 -e -f Makefile'
/bin/sh: 1: -j: not found
0 errors, 0 warnings
I note that this error has been found and corrected previously, through running a different version of Codelite from 6.1.1 (that which apt-get installs). I therefore found the updated version of armhf .deb codelite from the rasbian archive with gdebi-gtk. However the updated version (9.1.1) produces the following error (install attempt with the graphical debian):
Error: Dependency is not satisfiable: libclang 1-3.8 (>=3.2)
I do not understand why the package manager cannot update these packages - do they not exist for the pi? I ran the manager as root, so I do not think it is a permissions issue.
EDIT 1:
Thank you for that Fabre. My Enviromental Variables file now looks like this:
CodeLiteDir=/usr/share/codelite
export MAKE=make
I still get the same error however.

yesod persistent dependencies missing

I have tried to follow the Yesod quick start from the official website, but when running yesod devel (after installation and running yesod init) it fails to build due to a missing dependency if I use sqlite, postgresql, postgresql+fay or mysql (the 'simple' option from yesod-init works fine).
The error messages given are:
For sqlite:
cabal: At least the following dependencies are missing:
persistent-sqlite ==1.3.*
For postgresql:
cabal: At least the following dependencies are missing:
persistent-postgresql ==1.3.*
For postgres + fay:
cabal: At least the following dependencies are missing:
fay >=0.16, persistent-postgresql ==1.3.*, yesod-fay >=0.5.0.1
For mysql:
cabal: At least the following dependencies are missing:
persistent-mysql ==1.3.*
For mongoDB:
cabal: At least the following dependencies are missing:
persistent-mongoDB ==1.3.*
Does anyone know what is going wrong and how it can be fixed?
Update:
I was able to fix some of the problems by installing, separately from the yesod-platform, some of the missing dependencies.
cabal install persistent-sqlite fixed any problems using sqlite.
cabal install persistent-postgresql and cabal install persistent-mysql worked after installing some extra distribution packages to my Mint 16 system (libpq-dev and libmysqlclient-dev).
cabal install persistent-mongodb failed with an error I could not resolve:
Resolving dependencies...
Configuring persistent-mongoDB-1.3.1...
Building persistent-mongoDB-1.3.1...
Preprocessing library persistent-mongoDB-1.3.1...
[1 of 1] Compiling Database.Persist.MongoDB ( Database/Persist/MongoDB.hs, dist/build/Database/Persist/MongoDB.o )
Database/Persist/MongoDB.hs:420:26:
Not in scope: type constructor or class `MonadThrow'
Failed to install persistent-mongoDB-1.3.1
cabal: Error: some packages failed to install:
persistent-mongoDB-1.3.1 failed during the building phase. The exception was:
ExitFailure 1
Does anybody know how to resolve this issue?
Update:
This final problem has been solved by the maintainer updating the cabal package.
There is a new version without this error (I have installed persistent-mongoDB-1.3.1.1, the previous version had the error you found).
Do a cabal update to refresh the packages list and try again.

Issue compiling thrift 0.9.0 c++ client

I have tried compiling a cpp application with thrift 0.9.0 on ubuntu precise32:
g++ hello_client.cpp gen-cpp/HelloSvc.cpp -lthrift
However, this results in:
In file included from /usr/local/include/thrift/transport/TSocket.h:25:0,
from hello_client.cpp:4:
/usr/local/include/thrift/transport/TTransport.h:34:1: error: 'uint32_t' does not name a type
/usr/local/include/thrift/transport/TTransport.h:107:3: error: 'uint32_t' does not name a type
...
I tried to fix 0.9.0 by:
1) Install python-dev (I noticed an error: missing python.h when building thrift)
sudo apt-get install python-dev
2) Building thrift with:
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"
Still the same errors, so I decided to checkout, build and install the latest thrift (HEAD version 6f2a5037105ccad05eb84ec0a60da3389c85eb3f in git).
With the latest thrift, there were no errors building the cpp client. However, running a.out returned an error:
./a.out: error while loading shared libraries: libthrift-1.0.0-dev.so: cannot open
shared object file: No such file or directory
Setting LD_LIBRARY_PATH to the newly built thrift library fixed this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$THRIFT_SRC/lib/cpp/.libs/