pnavarro
(Pablo Sebastian Navarro)
September 10, 2020, 2:09am
1
Estimados, quise instalar PyAfipws en Ubuntu 20.04 para poder instalar otros modulos a Tryton 5.6 siguiendo las instrucciones de instalación de https://github.com/reingart/pyafipws
y me lanza los siguientes errores:
Requirement already satisfied: httplib2>=0.7 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (0.14.0)
Requirement already satisfied: pysimplesoap==1.08.14 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 2)) (1.8.14)
Collecting m2crypto>=0.18
Using cached M2Crypto-0.36.0.tar.gz (1.1 MB)
Processing /root/.cache/pip/wheels/b4/7f/00/f90ea7c44f8b921477205baa66a7aaf04be398f743ea946fd5/fpdf-1.7.2-py2.py3-none-any.whl
Collecting dbf>=0.88.019
Using cached dbf-0.99.0-py3-none-any.whl (71 kB)
Requirement already satisfied: Pillow>=2.0.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 6)) (7.0.0)
Collecting aenum
Using cached aenum-2.2.4-py3-none-any.whl (41 kB)
Building wheels for collected packages: m2crypto
Building wheel for m2crypto (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mtsbs3ed
cwd: /tmp/pip-install-3jjmacjp/m2crypto/
Complete output (55 lines):
running bdist_wheel
running build
running build_py
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.8/lib2to3/Grammar.txt
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.8/lib2to3/PatternGrammar.txt
copying M2Crypto/m2.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/DH.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/six.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-3.8/M2Crypto
creating build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -D__x86_64__ -I/usr/include/python3.8 -I/usr/include/openssl -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -includeall -modern -builtin -outdir /tmp/pip-install-3jjmacjp/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
Deprecated command line option: -modern. This option is now always on.
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for m2crypto
Running setup.py clean for m2crypto
Failed to build m2crypto
Installing collected packages: m2crypto, fpdf, aenum, dbf
Running setup.py install for m2crypto ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v3z7hb26/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/m2crypto
cwd: /tmp/pip-install-3jjmacjp/m2crypto/
Complete output (58 lines):
running install
running build
running build_py
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.8/lib2to3/Grammar.txt
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.8/lib2to3/PatternGrammar.txt
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/DH.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/six.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-3.8/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-3.8/M2Crypto
creating build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-3.8/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -D__x86_64__ -I/usr/include/python3.8 -I/usr/include/openssl -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -includeall -modern -builtin -outdir /tmp/pip-install-3jjmacjp/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
Deprecated command line option: -modern. This option is now always on.
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3jjmacjp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v3z7hb26/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/m2crypto Check the logs for full command output.
--------------------------------------------------------------------------------
A que se debe? Existe alguna incompatibilidad con Python?
Saludos
Pablo
joseagrc
(José Arturo García)
September 10, 2020, 2:54am
2
Saludos @pnavarro ,
debes usar la rama que fue creada para python3 específicamente, ya que tienes instalado python3.8,
la rama esta en: https://github.com/reingart/pyafipws/tree/py3k
y las instrucciones serian:
sudo apt-get install python-httplib2 python-m2crypto
wget https://github.com/reingart/pyafipws/archive/py3k.zip
unzip pyafipws-py3k.zip
cd pyafipws-py3k
sudo pip install -r requirements.txt
pnavarro
(Pablo Sebastian Navarro)
September 14, 2020, 12:54am
3
Estimado que tal. Estuve aplicando los pasos que me dio. Tuve que hacer una nueva instalacion en una maquina virtual con Ubuntu 18.04. En Ubuntu 20.04 los problemas son peores.
Sin embargo al intentar instalar PyAfipws, la mayor parte se instala, pero me aparece el siguiente error al ejecutar la orden: “sudo pip3 install -r requirements.txt”
The directory ‘/home/pablo/.cache/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 ‘/home/pablo/.cache/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 git+https://github.com/pysimplesoap/pysimplesoap.git@stable_py3k#pysimplesoap (from -r requirements.txt (line 2))
Cloning https://github.com/pysimplesoap/pysimplesoap.git (to stable_py3k) to /tmp/pip-3v9j6cxk-build
Collecting httplib2>=0.12.0 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/b3/ad/d9d9331850ea5bd4f5cb8c650c0bfa119a4abd6b0ad7c45b6506bc979fc0/httplib2-0.18.1-py3-none-any.whl (95kB)
100% |████████████████████████████████| 102kB 641kB/s
Collecting m2crypto>=0.18 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/ff/df/84609ed874b5e6fcd3061a517bf4b6e4d0301f553baf9fa37bef2b509797/M2Crypto-0.36.0.tar.gz (1.1MB)
100% |████████████████████████████████| 1.1MB 472kB/s
Collecting fpdf>=1.7.2 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/37/c6/608a9e6c172bf9124aa687ec8b9f0e8e5d697d59a5f4fad0e2d5ec2a7556/fpdf-1.7.2.tar.gz
Collecting dbf>=0.88.019 (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/ca/e1/192378726e2570c47d8f5c028897f7c896762729605629fc63588f32d3aa/dbf-0.99.0-py3-none-any.whl (71kB)
100% |████████████████████████████████| 71kB 1.0MB/s
Requirement already satisfied: Pillow>=2.0.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 6))
Collecting certifi>=2020.4.5.1 (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156kB)
100% |████████████████████████████████| 163kB 1.0MB/s
Collecting aenum (from dbf>=0.88.019->-r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/5b/58/1007ed4a287c6dd3dc953ae478145bab28e8abc529627b2ee797f84b201e/aenum-2.2.4-py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 584kB/s
Installing collected packages: httplib2, m2crypto, fpdf, aenum, dbf, certifi, PySimpleSOAP
Found existing installation: httplib2 0.9.2
Not uninstalling httplib2 at /usr/lib/python3/dist-packages, outside environment /usr
Running setup.py install for m2crypto ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-85u2smno/m2crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hbxth7_q-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DH.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/six.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-3.6/M2Crypto
creating build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/SWIG
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/tmp/pip-build-85u2smno/m2crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-3.6/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING
SWIG/_m2crypto_wrap.c:3561:10: fatal error: openssl/err.h: No existe el archivo o el directorio
#include <openssl/err.h>
^~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-85u2smno/m2crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hbxth7_q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-85u2smno/m2crypto/
--------------------------------------------------------------------------------------------------
Me está faltando instalar algun módulo antes de PyAfipws?
Saludos
Pablo
joseagrc
(José Arturo García)
September 14, 2020, 2:21am
4
Saludos @pnavarro ,
los errores que estas presentando es porque no puedes compilar el paquete, lo que significa que necesitas ejecutar el siguiente comando para poder compilarlo: sudo apt-get install build-essential python3-dev
te presentara el mismo error no importa si estas en ubuntu 18.04 o ubuntu 20.04 necesitas esos paquetes de compilación.
errores de permisos, necesitas instalar el paquete sin usar sudo para que se instale en el usuario actual.
pnavarro
(Pablo Sebastian Navarro)
September 14, 2020, 3:05am
5
Perfecto. Ya casi. Ahora me lanza los siguientes errores:
Collecting git+https://github.com/pysimplesoap/pysimplesoap.git@stable_py3k#pysimplesoap (from -r requirements.txt (line 2))
Cloning https://github.com/pysimplesoap/pysimplesoap.git (to stable_py3k) to /tmp/pip-mri1ah30-build
Collecting httplib2>=0.12.0 (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/b3/ad/d9d9331850ea5bd4f5cb8c650c0bfa119a4abd6b0ad7c45b6506bc979fc0/httplib2-0.18.1-py3-none-any.whl
Collecting m2crypto>=0.18 (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/ff/df/84609ed874b5e6fcd3061a517bf4b6e4d0301f553baf9fa37bef2b509797/M2Crypto-0.36.0.tar.gz
Collecting fpdf>=1.7.2 (from -r requirements.txt (line 4))
Collecting dbf>=0.88.019 (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/ca/e1/192378726e2570c47d8f5c028897f7c896762729605629fc63588f32d3aa/dbf-0.99.0-py3-none-any.whl
Collecting Pillow>=2.0.0 (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/30/bf/92385b4262178ca22b34f82e0e09c2922eb351fe39f3cc7b8ba9ea555b41/Pillow-7.2.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting certifi>=2020.4.5.1 (from -r requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting aenum (from dbf>=0.88.019->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/5b/58/1007ed4a287c6dd3dc953ae478145bab28e8abc529627b2ee797f84b201e/aenum-2.2.4-py3-none-any.whl
Building wheels for collected packages: m2crypto
Running setup.py bdist_wheel for m2crypto ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cq0l1ni4/m2crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp6986hiq_pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DH.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/six.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-3.6/M2Crypto
creating build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -D__x86_64__ -I/usr/include/python3.6m -I/usr/include/openssl -I/usr/lib/gcc/x86_64-linux-gnu/7/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include -includeall -modern -builtin -outdir /tmp/pip-build-cq0l1ni4/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
----------------------------------------
Failed building wheel for m2crypto
Running setup.py clean for m2crypto
Failed to build m2crypto
Installing collected packages: httplib2, m2crypto, fpdf, aenum, dbf, Pillow, certifi, PySimpleSOAP
Running setup.py install for m2crypto ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cq0l1ni4/m2crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0yg25phb-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
INFO:load_grammar:Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DH.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/six.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/m2crypto.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-3.6/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-3.6/M2Crypto
creating build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-3.6/M2Crypto/SSL
running build_ext
building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -py3 -D__x86_64__ -I/usr/include/python3.6m -I/usr/include/openssl -I/usr/lib/gcc/x86_64-linux-gnu/7/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include -includeall -modern -builtin -outdir /tmp/pip-build-cq0l1ni4/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cq0l1ni4/m2crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0yg25phb-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-cq0l1ni4/m2crypto/
------------------------------------------------
Saludos
Pablo
pnavarro
(Pablo Sebastian Navarro)
September 14, 2020, 3:22am
6
Resolví los problemas con el siguiente comando:
sudo apt-get install libssl-dev swig python3-dev gcc
Sin embargo me sigue diciendo que no encuentra el módulo Pyafipws.
ERROR:tryton.common.common:Traceback (most recent call last):
File "/home/pablo/.local/lib/python3.6/site-packages/tryton/gui/main.py", line 277, in do_activate
common.Login()
File "/home/pablo/.local/lib/python3.6/site-packages/tryton/common/common.py", line 900, in __init__
func(parameters)
File "/home/pablo/.local/lib/python3.6/site-packages/tryton/rpc.py", line 87, in login
result = connection.common.db.login(username, parameters, language)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/home/pablo/.local/lib/python3.6/site-packages/tryton/jsonrpc.py", line 306, in __request
raise Fault(*response['error'])
tryton.jsonrpc.Fault: No module named 'pyafipws'
Fault: No module named 'pyafipws'
Saludos
Pablo
lukio
(Luciano Rossi)
September 14, 2020, 3:38pm
7
Hola @pnavarro , te comento que el módulo de account_invoice_ar tiene como dependencia a party_ar , que a su vez, agrega entre sus dependencias a pyafipws .
Cuando ejecutas python setup.py install
en el módulo de account_invoice_ar
tendría que descargarte el módulo de pyafipws para la versión de python3.
Saludos,
Luciano Rossi (lukio)
pnavarro
(Pablo Sebastian Navarro)
September 14, 2020, 4:53pm
8
Hola Luciano que tal. Ingresé al directorio del módulo account_invoice_ar y ejecuté el comando “python setup.py install” y me aparece el siguiente error:
Traceback (most recent call last):
File “setup.py”, line 9, in
from configparser import ConfigParser
ImportError: No module named configparser
Que me está faltando ahora?
Saludos
Pablo
lukio
(Luciano Rossi)
September 14, 2020, 7:01pm
9
Hola!
Te falta instalar configparser. Es raro, porque ese módulo se instala cuando instalas trytond. Desconozco como lo tenes instalado, pero para instalar configparser tendrias que hacer:
pip install configparser
pnavarro
(Pablo Sebastian Navarro)
September 14, 2020, 7:08pm
10
Hola Luciano. Precisamente lo instalé con el comando:
pip3 install configparser
No se si tendrá algo que ver la versión de Python. En este caso la versión 3.6. Estoy usando Ubuntu 18.06 con Tryton 5.6.
Saludos
Pablo
pokoli
(Sergi Almacellas Abellana)
September 15, 2020, 7:14am
11
Configparser forma parte de la libreria estandard de Tryton, por lo que no tienes que instalar ninguna libreria adicional.
Creo que tiene que ver con la versión de Python.
En Python2 configparser se tiene que importar con:
from ConfigParser import ConfigParser
Y en Python3:
from configparser import ConfigParser
Notese que hay una diferencia entre las mayusculas y las minúsculas.
pnavarro
(Pablo Sebastian Navarro)
September 17, 2020, 1:06am
12
Ok. Ya logré descargar el modulo PyAfipws dentro de la carpeta Modulos de Tryton. Luego ingresé a la carpera PyAfipws y ejecuté la orden:
phyton3 setup.py install
Me aparece el siguiente error:
running install
error: can’t create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/test-easy-install-2314.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.6/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or “root” account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
Al parecer es un problema con los permisos. Como puedo cambiar esos permisos?
Saludos
Pablo
German
(German Dario Alvarez)
September 17, 2020, 1:40am
13
Dale sudo python3 setup.py install no?
pnavarro
(Pablo Sebastian Navarro)
September 17, 2020, 1:44am
14
Hola Geman, acabo de resolverlo justamente con ese comando:
sudo python3 setup.py install
Pyafipws al parecer se instala correctamente porque no lanza ningun error, pero al ejecutal Tryton con el comando: trytond -c /etc/tryton/trytond.conf me aparece el siguiente error:
Traceback (most recent call last):
File “/home/pablo/.local/bin/trytond”, line 51, in
info = get_module_info(module)
File “/home/pablo/.local/lib/python3.6/site-packages/trytond/modules/init .py”, line 87, in get_module_info
with tools.file_open(os.path.join(name, ‘tryton.cfg’)) as fp:
File “/home/pablo/.local/lib/python3.6/site-packages/trytond/tools/misc.py”, line 76, in file_open
raise IOError('File not found : %s ’ % name)
OSError: File not found : /home/pablo/.local/lib/python3.6/site-packages/trytond/modules/pyafipws/tryton.cfg
Me esta faltando un archivo de configuración tryton.cfg?
Saludos
Pablo
joseagrc
(José Arturo García)
September 17, 2020, 12:26pm
15
no debes de descargarlo a la carpeta de modulos de Tryton, debes descargarlo en cualquier otro lugar y luego lo instalas, ya que PyAfipws no es un modulo de Tryton y lo tienes en la carpeta de modulos por eso te esta solicitando el archivo de configuración del modulos, en otras palabras toda carpeta que este dentro de la carpeta modules se considera un modulo de Tryton por lo que dicho modulo debe tener un archivo tryton.cfg
pnavarro
(Pablo Sebastian Navarro)
September 18, 2020, 8:00pm
16
Por Fin logré instalar Tryton como corresponde. Bueno ahora me armo un tutorial y trato de replicar la instalación.
Mi nueva consulta. Cuando se instala Tryton, es necesario instalar obligatoriamente los módulos Sale, Account y Party si luego quiero instalar los módulos de mi localización “ar” (account_ar, party_ar, etc)?
Saludos
Pablo
formateli
(Fredy Ramirez)
September 19, 2020, 1:21pm
17
pnavarro:
es necesario instalar obligatoriamente los módulos Sale, Account y Party si luego quiero instalar los módulos de mi localización “ar” (account_ar, party_ar, etc)?
Es muy probable que los modulos de localizacion dependan de estos, Los moduloes de Tryton contienen un archivo de configuracion ‘tryton.cfg’ donde podrás ver las dependencias que tiene.
pnavarro
(Pablo Sebastian Navarro)
September 19, 2020, 1:49pm
18
Perfecto. Muchas gracias.
Saludos!
lukio
(Luciano Rossi)
September 21, 2020, 4:01pm
19
pnavarro:
Mi nueva consulta. Cuando se instala Tryton, es necesario instalar obligatoriamente los módulos Sale, Account y Party si luego quiero instalar los módulos de mi localización “ar” (account_ar, party_ar, etc)?
Los módulos de party y account sí. Si instalas account_invoice de Tryton core, obviamente ya te trae esos módulos. El módulo sale (el de ventas) no es algo requerido. Depende de tu modelo de negocios si vas a utilizar el módulo de Ventas o no.
Saludos,
pnavarro
(Pablo Sebastian Navarro)
September 21, 2020, 5:55pm
20
Gracias Luciano. La empresa, es una empresa de servicios por lo que genera facturas de manera concurrente. Peor también se venden productos.
Saludos
Pablo