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
Related
I have python installed on windows server without internet connection.
Now I want to connect to the SQL Server database on the server via python and therefore wanted to install PyODBC.
I downloaded pyodbc-4.0.17.tar.gz from their website from local windows with internet connection, uploaded to the server and tried to install it through the command line via pip install, but get the following error message:
ERROR: Command errored out with exit status 1:
command: 'c:\users\a2289770-3\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tok
enize; sys.argv[0] = '"'"'C:\\Users\\A22897~1\\AppData\\Local\\Temp\\3\\pip-req-build-agil8hty\\setup.py'"'"'; __file__=
'"'"'C:\\Users\\A22897~1\\AppData\\Local\\Temp\\3\\pip-req-build-agil8hty\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"
'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exe
c'"'"'))' install --record 'C:\Users\A22897~1\AppData\Local\Temp\3\pip-record-hfui07d3\install-record.txt' --single-vers
ion-externally-managed --compile --install-headers 'c:\users\a2289770-3\appdata\local\programs\python\python37\Include\p
yodbc'
cwd: C:\Users\A22897~1\AppData\Local\Temp\3\pip-req-build-agil8hty\
Complete output (5 lines):
running install
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.micr
osoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\a2289770-3\appdata\local\programs\python\python37\python.exe' -
u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A22897~1\\AppData\\Local\\Temp\\3\\pip-req-build-a
gil8hty\\setup.py'"'"'; __file__='"'"'C:\\Users\\A22897~1\\AppData\\Local\\Temp\\3\\pip-req-build-agil8hty\\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\A22897~1\AppData\Local\Temp\3\pip-record-hfui07d3\
install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\a2289770-3\appdata\local\p
rograms\python\python37\Include\pyodbc' Check the logs for full command output.
So I tried to install Visual C++ 14 but all the installation packages that I tried try to connect to the internet and therefore stop during the installation process.
Can anyone help out here?
Ok I found a solution here: How to install packages offline?
creating requirements.txt including all needed packages via pip freeze > requirements.txt
Downloading all packages and their dependencies into a directory on local windows with internet connection - also including requirements.txt there (in my case "wheelhouse" via pip download, see link for details)
upload that directory onto the Server
installing with the following command
pip install -r wheelhouse/requirements.txt --no-index --find-links wheelhouse
Now I can use pyodbc on the offline server.
I find it strange that it required Microsoft Visual C++ 14.0 before and works now without me having installed it but whatever... if anyone knows the reason for this I would be interested to read it in the comments.
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
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).
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
I found out about pytesseract and OCR with python so I wanted to try it out and for it to work I need to install tesseract-ocr using pip install on windows but it doesn't work and I get an error. I already have pytesseract and tesseract installed but not tesseract-ocr.
I tried downloading tesseract-ocr from pycharm as well but it doesn't work, I also downloaded Leptonica but it didn't fix anything.
So how do I fix this?
Here is the error :
Installing collected packages: tesseract-ocr
Running setup.py install for tesseract-ocr ... error
ERROR: Complete output from command 'C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-6mlxue4n\\tesseract-ocr\\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\PC\AppData\Local\Temp\pip-record-1s62w6u0\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
file tesseract_ocr.py (for module tesseract_ocr) not found
file tesseract_ocr.py (for module tesseract_ocr) not found
running build_ext
building 'tesseract_ocr' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command "'C:\Users\PC\AppData\Local\Programs\Python\Python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-6mlxue4n\\tesseract-ocr\\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\PC\AppData\Local\Temp\pip-record-1s62w6u0\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PC\AppData\Local\Temp\pip-install-6mlxue4n\tesseract-ocr\
download the ms visual installer. once downloaded, navigate to individual components then select 'Windows 10/11 SDK (based on your version of windows)', 'C++ 2022 redistributable update', and 'C++/CLI support for v143 build tools (latest)'. then click modify on the bottom right corner.