No module named pytrustnfe.nfe (Odoo Server Error) - odoo

I have some problems to install Odoo Module named ODOO BRASIL - MODULO BASE (br_base).
The error message is:
O módulo "br_base" não pode ser instalado porque uma dependência
externa não foi encontrada: No module named pytrustnfe.nfe
Translating:
The module "br_base not be installed because external dependency not
founded: No module named pytrustnfe.nfe

If you are using Linux:
pip install PyTrustNFe

The dependency of PyTrustNFe called xmlsec didn't installed. When I try install this dependency I had this.
[root#agileweb ~]# pip install xmlsec
Collecting xmlsec
Using cached https://files.pythonhosted.org/packages/35/42/d7cd323c91d4706f3cc32ffe7d5f851ab8ef9898ccb350f6ba593dd8b89a/xmlsec-1.3.3.tar.gz
Requirement already satisfied: pkgconfig in /usr/lib/python2.7/site-packages (from xmlsec) (1.3.1)
Requirement already satisfied: lxml>=3.0 in /usr/lib64/python2.7/site-packages (from xmlsec) (3.7.1)
Building wheels for collected packages: xmlsec
Running setup.py bdist_wheel for xmlsec ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-sk_Ibz/xmlsec/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-Vx1fna --python-tag cp27:
running bdist_wheel
running build
running build_ext
*********************************************************************************
Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?
*********************************************************************************
----------------------------------------
Failed building wheel for xmlsec
Running setup.py clean for xmlsec
Failed to build xmlsec
Installing collected packages: xmlsec
Running setup.py install for xmlsec ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-sk_Ibz/xmlsec/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-qiBfpy/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
*********************************************************************************
Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?
*********************************************************************************
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-sk_Ibz/xmlsec/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-qiBfpy/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-sk_Ibz/xmlsec/

The correct command to solve this problem would be PIP3 since this dependency is getting deprecated in python2.7
pip3 install PyTrustNFe3==1.0.35

Related

Cannot install numpy in virtual env python 3.6

I have tried pip install numpy and pip install numpy==1.13.3 and I keep getting this error:
Command "/home/pi/.virtualenvs/venv_python36/bin/python3.6 -u -c
"import setuptools,
tokenize;__file__='/tmp/pip-build-f4w3ieb6/numpy/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-ngusfvpy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.virtualenvs/venv_python36/include/site/python3.6/numpy"
failed with error code 1 in /tmp/pip-build-f4w3ieb6/numpy/
It works fine on python 3.5
Full log: https://pastebin.com/Jah0FVcc (too long to post)
pip install -U setuptools fixed the problem and I was able to install numpy without issues

Unable to install Pandas in Python 3.4

I am trying to install Pandas module in Python version 3.4 (for Windows XP support). However, I am getting following error:
UPDATING build\lib.win32-3.4\pandas/_version.py
set build\lib.win32-3.4\pandas/_version.py to '0.22.0'
running build_ext
building 'pandas._libs.tslibs.strptime' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
----------------------------------------
Command "C:\Python34\python.exe -u -c "import setuptools, tokenize;
__file__='C:\\users\\cardio\\Temp\\pip-build-5xhz4ymf\\pandas\\setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');f.close(); exec(compile(code, __file__, 'exec'))"
install --record C:\users\cardio\Temp\pip-prngb6r2-record\install-record.txt
--single-version-externally-managed --compile"
failed with error code 1 in C:\users\cardio\Temp\pip-build-5xhz4ymf\pandas\
How can this problem be solved?

Installing scrapy on ubuntu 14.04 fails with error in cryptography setup command Invalid environment marker

I tried installing scrapy on another server.
When I run pip install scrapy:
error in cryptography setup command: Invalid environment marker: python_version < '3'
Complete output from command python setup.py egg_info:
error in cryptography setup command: Invalid environment marker: python_version < '3'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log
any ideas please help
Python 2.7.6
I did
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
and
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev
I did an sudo apt-get update before that too
The same happens on debian 8. You can pin the cryptography library on version 2.0.3, then retrying.
pip install cryptography==2.0.3
I just encountered this same issue and solved it via:
pip install --upgrade setuptools pip
Apparently the default version of setuptools and pip on 14.04 is insufficient for the cryptography package.

window pip install scrapy error "running build_ext error: [Error 5]"

How can I avoid this error?
running build_ext
error: [Error 5]
----------------------------------------
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\admini~1\\appdata\\local\\temp\\pip-build-zc67ii\\Twisted\\setup.py';f=g
etattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.c
lose();exec(compile(code, __file__, 'exec'))" install --record c:\users\admini~1
\appdata\local\temp\pip-pxb6xl-record\install-record.txt --single-version-extern
ally-managed --compile" failed with error code 1 in c:\users\admini~1\appdata\lo
cal\temp\pip-build-zc67ii\Twisted\
C:\Users\Administrator>
Installing Scrapy on Windows can be a real struggle.
That's why the scrapy documentation recommands to use Anaconda for the scrapy installation. I think you should give it a try if you are working on Windows.
First you need to install Anaconda following this tutorial.
Then you just need to run this command conda install -c conda-forge scrapy
and you are good to go.

Change sudo pip install library to anaconda

My OS is Ubuntu 14.04. I want to install TensorFlow in anaconda2 and I am not using root. I downloaded anaconda2 and installed in /usr/anaconda2. I typed the following command:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
but in /usr/anaconda2/bin/python, I cannot import TensorFlow. I found that sudo pip installs the TensorFlow in Ubuntu default python2.7.6, so I tried installing it without sudo, but:
running build_scripts
creating build/scripts.linux-x86_64-2.7
Creating build/scripts.linux-x86_64-2.7/f2py
adding 'build/scripts.linux-x86_64-2.7/f2py' to scripts
changing mode of build/scripts.linux-x86_64-2.7/f2py from 664 to 775
running install_lib
creating /usr/anaconda2/pkgs/lib
error: could not create '/usr/anaconda2/pkgs/lib': Permission denied
----------------------------------------
Command "/home/ds/.conda/envs/tensorflow_env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-THK_wR/numpy/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-znMmTV-record/install-record.txt --single-version-externally-managed --compile --prefix=/usr/anaconda2/pkgs" failed with error code 1 in /tmp/pip-build-THK_wR/numpy/
I have no Permission to write file in /usr/anaconda2. What should I do?
Anaconda comes with its own package manager called conda,to install a package on Anaconda environment and not the default python do
conda update conda
conda install <package name>
in your case:
conda install -c conda-forge tensor flow
or you could just add the channel first:
conda config --add channels conda-forge
then install by:
conda install tensorflow