I am trying to install ibm_db module for python using pip install but getting below error.
" C:\Users\n087514>pip install ibm_db Collecting ibm-db Using cached
https://repo-man.aetna.com/nexus/repository/ae-pypi-group/packages/f8/6f/5f8186cb31021409235a948be5e29d77761ef92747a101360003747c4105/ibm_db-2.0.8.tar.gz
Installing collected packages: ibm-db Running setup.py install for
ibm-db ... error
Complete output from command "c:\program files (x86)\python 3.5\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\n087514\AppData\Local\Temp\pip-g_xrj1vq-record\install-record.txt
--single-version-externally-managed --compile:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py",
line 17, in
os.rename('tests','test_2')
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'tests' -> 'test_2'
---------------------------------------- Command ""c:\program files (x86)\python 3.5\python.exe" -u -c "import setuptools,
tokenize;file='C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\n087514\AppData\Local\Temp\pip-g_xrj1vq-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users\n087514\AppData\Local\Temp\pip-build-_w1_snzp\ibm-db\"
Anyone has any idea what needs to be done?
Thanks in advance!
Try:
pip install "ibm_db==2.0.8a"
Related
I get the following output when I try to run pip3 install pytorch or pip install pytorch
Collecting pytorch
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Building wheels for collected packages: pytorch
Building wheel for pytorch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3v4wd97t/pytorch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3v4wd97t/pytorch/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-8rsdyb8e
cwd: /tmp/pip-install-3v4wd97t/pytorch/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3v4wd97t/pytorch/setup.py", line 15, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
----------------------------------------
ERROR: Failed building wheel for pytorch
Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch ... error
ERROR: Command errored out with exit status 1:
command: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3v4wd97t/pytorch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3v4wd97t/pytorch/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-eld9j0g4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chaitanya/.local/include/python3.8/pytorch
cwd: /tmp/pip-install-3v4wd97t/pytorch/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3v4wd97t/pytorch/setup.py", line 11, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
----------------------------------------
ERROR: Command errored out with exit status 1: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3v4wd97t/pytorch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3v4wd97t/pytorch/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-eld9j0g4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chaitanya/.local/include/python3.8/pytorch Check the logs for full command output.
I downloaded the matching wheel from here, but am couldn't figure out what to do with it. My Python installation is using anaconda3, if that's needed. What should I do from here? Tips on how I could have resolved this on my own would also be appreciated.
From your error:
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
which tells you what you need to know, instead of
pip install pytorch
it should be
pip install torch
I downloaded the matching wheel from here, but am couldn't figure out what to do with it
Installing .whl files is as easy as
pip install <path to .whl file>
My Python installation is using anaconda3
That is very relevant. You should generally avoid as much as possible to use pip in your conda environment. Instead, you can find the correct conda install command for your setup(cuda version etc.) from pytroch.org, e.g. for cuda 11 it would be
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
I'm new to this stuff and any help would be awesome. I'm installing this through putty on an onprem server.
Collecting cx_Oracle==7.3
Downloading https://files.pythonhosted.org/packages/5e/e3/cfd4f413f8d47dd2aee09273d9bb3ee6aa7384e0a04e191d703c2199eb93/cx_Oracle-7.3.0.tar.gz (307kB)
100% |################################| 317kB 7.6MB/s
Installing collected packages: cx-Oracle
Running setup.py install for cx-Oracle ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-YAwTvN/cx-Oracle/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-nqdlEI/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.solaris-2.11-sun4v.32bit-2.7
creating build/temp.solaris-2.11-sun4v.32bit-2.7/src
creating build/temp.solaris-2.11-sun4v.32bit-2.7/odpi
creating build/temp.solaris-2.11-sun4v.32bit-2.7/odpi/src
cc -DNDEBUG -KPIC -DPIC -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/usr/include/python2.7 -c src/cxoBuffer.c -o build/temp.solaris-2.11-sun4v.32bit-2.7/src/cxoBuffer.o
unable to execute 'cc': No such file or directory
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-YAwTvN/cx-Oracle/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-nqdlEI/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-YAwTvN/cx-Oracle/
Previously I was able to install awscli without any issues.
I'm not sure why is this happening.
I am trying to download the pyahocorasick package on my Windows 10 system using pip.
On my command line, I wrote-
pip install pyahocorasick
It gave the following output -
Collecting pyahocorasick
Using cached pyahocorasick-1.1.4.tar.bz2
Installing collected packages: pyahocorasick
Running setup.py install for pyahocorasick ... error
Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\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\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
failed to import Cython: DLL load failed: %1 is not a valid Win32 application.
error: Cython does not appear to be installed
----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\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\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Krishna\AppData\Local\Temp\pip-build-b7a1mq0t\pyahocorasick\
Then I tried to see if Cython is in fact installed, so I wrote-
Cython version
and the output was -
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\Scripts\cython.exe\__main__.py", line 5, in <module>
File "C:\Python34\lib\site-packages\Cython\Compiler\Main.py", line 28, in <module>
from .Scanning import PyrexScanner, FileSourceDescriptor
ImportError: DLL load failed: %1 is not a valid Win32 application.
And finally I tried -
install Cython
And the output was -
Requirement already satisfied: Cython in c:\python34\lib\site-packages
So my question is - if Cython is already installed, why does installing the package pyahocorasick give the error - Cython does not appear to be installed? And how can I fix this problem?
I wrote this command to install:
sudo pip install pymavlink
and got this error:
ImportError: No module named future
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-gsZblL/pymavlink/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ppCGHA-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-gsZblL/pymavlink
Storing debug log for failure in /root/.pip/pip.log
I have solved the problem installing this package:
$ sudo pip install dronekit
I've tried pip install scipy. I've tried all the suggestions on stackOverflow like updating pip, installing scipy manually through its website. I've tried getting it from github directly.
These are some of the errors I keep getting:
-When I try pip install:
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\kathyz~1\\appdata\\local\\temp\\pip-build-gmb8oc\\scipy\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\users\kathyz~1\appdata\local\temp\pip-gndjc
d-record\install-record.txt --single-version-externally-managed --compile" faile
d with error code 1 in c:\users\kathyz~1\appdata\local\temp\pip-build-gmb8oc\sci
py
-When I try through git:
Exception: Cython either isn't installed or it failed.
Cythonizing sources
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\kathyz~1\appdata\local\temp\pip-49aa2n-build\setup.py", lin
e 253, in <module>
setup_package()
File "c:\users\kathyz~1\appdata\local\temp\pip-49aa2n-build\setup.py", lin
e 246, in setup_package
generate_cython()
File "c:\users\kathyz~1\appdata\local\temp\pip-49aa2n-build\setup.py", lin
e 164, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\kathyz~1\\appdata\\local\\temp\\pip-49aa2n-build\\setup.py';exec(compile(ge
tattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record c:\users\kathyz~1\appdata\local\temp\pip-92weib-recor
d\install-record.txt --single-version-externally-managed --compile" failed with
error code 1 in c:\users\kathyz~1\appdata\local\temp\pip-49aa2n-build
So after getting error about cythonize, I tried installing it, which led to another error:
warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.h' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
error: Setup script exited with error: Unable to find vcvarsall.bat