venv - cannot install ansible in Windows 10 - python

I am trying to get ansible installed in venv in Python 3.8 in Windows 10.
I have tried:
pip install -U setuptools
pip3 install ansible
pip install –user
So far that has not worked.
I am getting error:
ERROR: Command errored out with exit status 1: 'c:\users\XXXXXXX\python\test_env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\pip-install-fi3oz0fp\\ansible\\setup.py'"'"';
__file__='"'"'C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\pip-install-fi3oz0fp\\ansible\\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\XXXXXXX\AppData\Local\Temp\pip-record-y3d0j5k5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\XXXXXXX\python\test_env\include\site\python3.8\ansible' Check the logs for full command output.

From the documentation regarding requirements for the control node:
Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on. Windows is not supported for the control node.
Meanwhile you can run ansible on Windows 10 from WSL (prefered) or from cygwin.

Related

how to install mathutils

I have already installed the c++ tools and updated the tools by pip install --upgrade setuptools but installing of mathutils does not work
Command errored out with exit status 1: 'c:\users\33749\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\33749\AppData\Local\Temp\pip-install-jbsp1j3h\mathutils_62d38e7d44a44d75978e68055dbcc440\setup.py'"'"'; file='"'"'C:\Users\33749\AppData\Local\Temp\pip-install-jbsp1j3h\mathutils_62d38e7d44a44d75978e68055dbcc440\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\33749\AppData\Local\Temp\pip-record-bc4w9hy_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\33749\appdata\local\programs\python\python39\Include\mathutils' Check the logs for full command outpu
Since the module "mathutils" is written in portable C, it needs c++ tools to compile it. therefore, after I installed the VS from the link provided in the VS Code terminal and restarted the computer, the module "mathutils" can be installed.

"Scrapy" Installation Error using pip install

I am trying to install Scrapy from the command line and getting the following error.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paran\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\paran\\AppData\\Local\\Temp\\pip-install-sa3_a6ft\\Twisted\\setup.py'"'"'; __file__='"'"'C:\\Users\\paran\\AppData\\Local\\Temp\\pip-install-sa3_a6ft\\Twisted\\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\paran\AppData\Local\Temp\pip-record-egqr0bb7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paran\appdata\local\programs\python\python38\Include\Twisted'
If you see the installation guide it's recommended to install Scrapy with anaconda or miniconda. Installing scrapy on Windows using pip is a headache.
I installed it right now at my office pc running on windows 10 using pip to test it:
win10, python 3.7
manually download twisted from
https://www.lfd.uci.edu/~gohlke/pythonlibs/
choose the version and download Twisted-18.7.0-cp35-cp35m-win_amd64.whl
cd to files download directory
pip install Twisted-18.7.0-cp35-cp35m-win_amd64.whl
pip install scrapy
pip install pypiwin32
In windows Scrapy required some dependencies before installation please read this
https://docs.scrapy.org/en/latest/intro/install.html
There is also another way to install Scrapy in windows using anaconda

Cannot install cvxpy with python 3.8

I have tried installing cvxpy (https://www.cvxpy.org/install/) for python. I use Python 3.8 for all my projects and am not to fond of making virtual environments where i use 3.7. Does anyone have a fix for using cvxpy on python 3.8 (I am using windows)?
Thanks!
ERROR: Command errored out with exit status 1:
ommand: 'AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'AppData\\Local\\Temp\\pip-install-kehvj2di\\osqp\\setup.py'"'"'; __file__='"'"'AppData\\Local\\Temp\\pip-install-kehvj2di\\osqp\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'AppData\Local\Temp\pip-record-1u4al7gt\install-record.txt' --single-version-externally-managed --compile
cwd: AppData\Local\Temp\pip-install-kehvj2di\osqp\
-- Selecting Windows SDK version to target Windows 10.0.18362.
CMake Error at CMakeLists.txt:5 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "AppData/Local/Temp/pip-install-kehvj2di/osqp/osqp_sources/build/CMakeFiles/CMakeOutput.log".
The system cannot find the file specified
CMake Error: Generator: execution of make failed. Make command was: MSBuild.exe osqpstatic.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=14.0 /v:m &&
error: [Errno 2] No such file or directory: 'osqp_sources\\build\\out\\Release\\osqp.lib'
----------------------------------------
ERROR: Command errored out with exit status 1: 'AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'Local\\Temp\\pip-install-kehvj2di\\osqp\\setup.py'"'"'; __file__='"'"'AppData\\Local\\Temp\\pip-install-kehvj2di\\osqp\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'AppData\Local\Temp\pip-record-1u4al7gt\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Your problem does not seem to be the Python version, but lack of build tools. Install Microsoft Visual Build Tools and make sure they are on the PATH (so that conda can execute MSBuild.exe).
Build Tools installation instructions from cvxpy (in pptx).

How to install jnius in python?

I tried to install jnius, I installed Visual Studio Build Tools, but when I enter pip install jnius, I get error:
ERROR: Command errored out with exit status 1:
'c:\users\вввв\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\\Users\\1D87~1\\AppData\\Local\\Temp\\pip-install-
9ggkbbff\\jnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\1D87~1\\AppData\\Local\\Temp\\pip-install-
9ggkbbff\\jnius\\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\1D87~1\AppData\Local\Temp\pip-record-
hczhl1cy\install-record.txt' --single-version-externally-managed --compile Check the logs for full
command output.
ERROR: Failed building wheel for jnius
How can I fix it?
I hope you help me
jnius, which is this pypi project does not support python 3.7 officially.
A quick google search however yields that the module is now called pyjnius, see this GitHub page:
Warning: the pypi name is now pyjnius instead of jnius.
So use the correct version and do:
pip install pyjnius
There are whl files for windows and python 3.7, so the installation should go smoothly. If not, you can check the installation instructions in the docs

Facing problem regarding installation of lxml in venv,

I am trying to setup evalai-cli using pip,
but i am facing problems during setup when i try to run
pip install evalai
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
ERROR: Command errored out with exit status 1:
command: 'c:\users\amana\evalai-cli\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\amana\AppData\Local\Temp\pip-install-iwb_ci9r\lxml\setup.py'"'"'; file='"'"'C:\Users\amana\AppData\Local\Temp\pip-install-iwb_ci9r\lxml\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\amana\AppData\Local\Temp\pip-record-tu5o2fvl\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\amana\evalai-cli\venv\include\site\python3.8\lxml'
cwd: C:\Users\amana\AppData\Local\Temp\pip-install-iwb_ci9r\lxml\
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
I have installed lxml using easy_install lxml & www.lfd.uci.edu
but still the problem remains
I am on windows 10 64 bit running python 38
Try to go to https://www.lfd.uci.edu/~gohlke/pythonlibs/
then you download the file lxml-4.4.2-cp38-cp38-win_amd64.whl
then open the Command and navigate to the folder containing the file lxml-4.4.2-cp38-cp38-win_amd64.whl
then run the Command pip install lxml-4.4.2-cp38-cp38-win_amd64.whl

Categories