Installing cx_oracle 5.2 in python 3.4.3 fails - python-3.x

I'm trying to install cx_oracle in my python 3.4.3 on CentOS via pip, but it fails.
$ sudo pip3.4 install cx_oracle
Collecting cx-oracle
Using cached cx_Oracle-5.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 168, in <module>
instantClientRPMLib = FindInstantClientRPMLib()
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in FindInstantClientRPMLib
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in <lambda>
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in <listcomp>
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
ValueError: invalid literal for int() with base 10: '2_encryption_required'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-m0e47l0_/cx-oracle
Any idea?
Setuptools is already up-to-date:
$ sudo pip3.4 install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/lib/python3.4/site-packages
Oracle client is installed and happily used from PHP and others
$ echo $ORACLE_HOME
/usr/lib/oracle/11.2/client64
$ echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client64/lib

Well, the issue was caused by having a '/usr/lib/oracle/11.2/client64/11.2_encryption_required' folder with an Oracle client where encryption was mandated.
Unfortunately in Oracle client you need to have a separate client if you want to use encryption for some of the connections you make and not for some of the other ones.
It seems that the cx_oracle installes's FindInstantClientRPMLib wasn't prepared to see any non-numerical values, so it failed on the "encryption_required" part.
Temporarily I have renamed the folder and then the installer error did go away.

Related

Unable to install pandas=0.18.1 on Python3.6

I am trying to setup a legacy project using python 3.6.13 as a constraint. Though I am running into an issue trying to install pandas version 0.18.1
The log are as below:
Collecting numpy==1.11.1 (from -r requirements-remote.txt (line 25))
Using cached https://files.pythonhosted.org/packages/e0/4c/515d7c4ac424ff38cc919f7099bf293dd064ba9a600e1e3835b3edefdb18/numpy-1.11.1.tar.gz
Collecting pandas==0.18.1 (from -r requirements-remote.txt (line 26))
Using cached https://files.pythonhosted.org/packages/11/09/e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/pandas-0.18.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in <module>
_CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
RuntimeError: Python version >= 3.7 required.
The error is pretty explicit: Python version >= 3.7 required. According to the paths you’re using 3.6 (i.e. from 2016, and that will reach end-of-life at the end of the year).
This seems to come from the fact that pandas is trying to install numpy-1.21.0rc2 as a dependency, see the traceback (emphasis mine):
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in
I’m not sure why pandas is doing that, but if you first install the numpy from your requirements file, pandas might consider that dependency resolved.
pip install numpy==1.11.1
pip install -r requirements-remote.txt
By the way, neither numpy 1.11.1 nor pandas 0.18.1 list python 3.6 as a supported python version, they both have 3.5 at most. It might still work, but maybe it could also fail due to python 3.6 being too new (I have no way of testing this − sorry). You could try to refresh these dependencies to the highest versions that still support python 3.6:
numpy 1.19.5
pandas 1.1.5

Installing pygame fails on local file [duplicate]

This question already has answers here:
Cannot install pygame in Pycharm
(1 answer)
pycharm doesn't recognize pygame package
(2 answers)
Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'dir:\projectPath\venv\Scripts\python.exe'
(8 answers)
Closed 2 years ago.
I am trying for a while now to install pygame into my Project but whatever I try is doesn’t work. The real frustrating part is that I managed to do it in the past. Witch might be the problem, but I am getting ahead of myself.
Environment:
Python 3.8
Windows 10
I use PyCharm
pip install pygame
i get:
Collecting pygame
Using cached
https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441
db2be/pygame-1.9.6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most
recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\setup.py", line 194, in
<module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\buildconfig\config.py", line
210, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\buildconfig\config_win.py",
line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-
la9vy5w2\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-
install-la9vy5w2\pygame\
I fould someone else who had the sme problem here:
Pip Install EOFError
and also:
Unable to install pygame on Python 3.8 via pip (Windows 10)
So I tried:
pip install pygame==2.0.0.dev6
I got:
Collecting pygame==2.0.0.dev6
Using cached
https://files.pythonhosted.org/packages/c5/a0/63f9ca836e6a08e560f1ef3f2535ffb46bfdad2abb093dd097dae25
2be28/pygame-2.0.0.dev6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\setup.py", line 258, in
<module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\config.py", line
208, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 17, in download_sha1_unzip
import requests
ModuleNotFoundError: No module named 'requests'
Making dir :prebuilt_downloads:
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\
I also tried some other stuff, like updating pip, but in the end I ended up with the same error message again. (If us want to see the full log just say it and I will upload the other 2 pages of error message.)
Am I right in my assumption that pip tries to install the game from a local file and that file is somehow corrupted or something?
If so how can I make pip install the packed form the Internet?
If not what is the problem?
I can even life with some weird solution like coping a entire project including its packages. (ok that would bug me a little, but as long as it works ...)
Since it was suggested to me I tried
pip install requests
in a new project:
Collecting requests
Using cached
https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests)
Using cached
https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached
https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests)
Using cached
https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
Using cached
https://files.pythonhosted.org/packages/9f/f0/a391d1463ebb1b233795cabfc0ef38d3db4442339de68f847026199e69d7/urllib3-1.25.10-py2.py3-none-any.whl
Installing collected packages: chardet, certifi, idna, urllib3, requests
Successfully installed certifi-2020.6.20 chardet-3.0.4 idna-2.10 requests-2.24.0 urllib3-1.25.10
and than:
pip install pygame==2.0.0.dev6
leading to:
Collecting pygame==2.0.0.dev6
Using cached https://files.pythonhosted.org/packages/c5/a0/63f9ca836e6a08e560f1ef3f2535ffb46bfdad2abb093dd097dae252be28/pygame-2.0.0.dev6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\setup.py", line 258, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\config.py", line 208, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 37, in download_sha1_unzip
raise ValueError(
ValueError: url:https://bitbucket.org/llindstrom/pygame/downloads/prebuilt-x64-pygame-1.9.2-20150922.zip should have checksum:3a5af3427b3aa13a0aaf5c4cb08daaed341613ed: Has:9571d3c5ad8347afb0b101bc242ef5da1a46bb11:
Making dir :prebuilt_downloads:
Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip 0bbac0106358dc99b8ba2401ae6a1c10d3927ca9
Unzipping :prebuilt_downloads\SDL2-devel-2.0.10-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b
Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.14-VC.zip c64d90c1f7d1bb3f3dcfcc255074611f017cdcc4
Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.14-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc
Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip:
Downloading... https://www.ijg.org/files/jpegsr9c.zip 9ca086c960ffc4bff821ba194c8d0a15f69eae09
Unzipping :prebuilt_downloads\jpegsr9c.zip:
Downloading... https://bitbucket.org/llindstrom/pygame/downloads/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\
here:
https://github.com/googleapis/google-cloud-python/issues/3884
I found the advice to use:
pip install --upgrade setuptools
witch lead to:
Collecting setuptools
Downloading
https://files.pythonhosted.org/packages/6d/ed/52e05469314a266f68d9f251a8c1ab7a21a03327b1724056e3eea654bfd1/setuptools-50.0.3-py3-none-any.whl (784kB)
100% |████████████████████████████████| 788kB 1.2MB/s
Installing collected packages: setuptools
Found existing installation: setuptools 40.8.0
Uninstalling setuptools-40.8.0:
Could not install packages due to an EnvironmentError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'd:\\workspace\\pycharmprojects\\libs5\\testproject\\venv\\lib\\site-packages\\setuptools-40.8.0-py3.8
.egg'
Consider using the `--user` option or check the permissions.
so i tried:
pip install --upgrade setuptools --user
witch worked:
Collecting setuptools
Using cached
https://files.pythonhosted.org/packages/6d/ed/52e05469314a266f68d9f251a8c1ab7a21a03327b1724056e3eea654bfd1/setuptools-50.0.3-py3-none-any.whl
Installing collected packages: setuptools
Successfully installed setuptools-50.0.3
sadly this did not change the Error message.

Pyautogui-module is not installing with pip3 on Ubuntu 19.10

I'm developing with python 3 and trying to install the pyautogui Module, and to be able to use it I had to install some packages. But I keep getting errors when installing the packages with pip3.
Collecting pyobjc-framework-Quartz
Using cached https://files.pythonhosted.org/packages/a9/af/fb7a7264d3bf0147bdd1d01eeb4e8b1cac90f0613aca336b178771dcdec7/pyobjc-framework-Quartz-6.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/setup.py", line 67, in <module>
py_limited_api=True,
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/pyobjc_setup.py", line 390, in Extension
os_level = get_os_level()
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/pyobjc_setup.py", line 200, in get_os_level
with open("/System/Library/CoreServices/SystemVersion.plist", "rb") as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4ukazwoa /pyobjc-framework-Quartz/
Anyone has a idea what the problem is?
Anything related to Objective C, pyobjc and especially pyobjc-framework-Quartz require Mac OS X. You cannot install them at Ubuntu.

NameError: name 'unicode' is not defined when I install package - Python 3

I'm trying to install the package. But there is the error. How can I fix it?
C:\WINDOWS\system32>python -m pip install zopyx.convert2
Collecting zopyx.convert2
Using cached zopyx.convert2-2.4.6.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-build-e90y11sx\zopyx.convert2\setup.py", line 17, in <module>
desc = unicode(file(os.path.join('docs', 'source', 'README.rst')).read().strip(), 'utf-8')
NameError: name 'unicode' is not defined
It looks to me like this library, which has not been updated since 2012, is not compatible with Python 3 and they haven't properly indicated that in the pypi metadata.
The source code is here, if you can't find an alternative library, you may be able to update it to python3 yourself and either make a pull request or a fork.

Python3.4 - Install pyautogui - Raspberry Pi 3

I've been trying to install pyautogui for Python 3.4 on my Raspberry Pi 3 for the last 2 hours... I need it because I wrote a touch keyboard application that needs to run on it. On my main machine (elementary OS 0.4 with Python 3.5) I was able to install it without any problems. First I tried sudo pip install pyautogui but that only installed the Python 2.7 version of pyautogui. Of course next I tried sudo pip3 install pyautogui but that gave me this error:
Running setup.py (path:/tmp/pip-build-hf289jja/pyautogui/setup.py) egg_info for package pyautogui
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-hf289jja/pyautogui/setup.py", line 6, in <module>
version=__import__('pyautogui').__version__,
File "/tmp/pip-build-hf289jja/pyautogui/pyautogui/__init__.py", line 114, in <module>
from . import _pyautogui_x11 as platformModule
File "/tmp/pip-build-hf289jja/pyautogui/pyautogui/_pyautogui_x11.py", line 6, in <module>
from Xlib.display import Display
File "/usr/local/lib/python3.4/dist-packages/Xlib/display.py", line 20, in <module>
import new
ImportError: No module named 'new'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-hf289jja/pyautogui/setup.py", line 6, in
version=__import__('pyautogui').__version__,
File "/tmp/pip-build-hf289jja/pyautogui/pyautogui/init.py", line 114, in
from . import _pyautogui_x11 as platformModule
File "/tmp/pip-build-hf289jja/pyautogui/pyautogui/_pyautogui_x11.py", line 6, in
from Xlib.display import Display
File "/usr/local/lib/python3.4/dist-packages/Xlib/display.py", line 20, in
import new
ImportError: No module named 'new'
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-hf289jja/pyautogui
Storing debug log for failure in /root/.pip/pip.log
... sorry for the formatting of the above, I couldn't get it to stay inside one code box.
I have no idea what module "new" is. I tried everything else under the sun, such as installing from the official resources: https://pypi.python.org/pypi/PyAutoGUI and various other guides, with NO results.. I'm kinda loosing my mind right now.
ANY Help is grately appreciated :)
Try the following:
sudo pip3 install python3-xlib
sudo pip3 install pyautogui
This assumes you have some other python3 libraries already installed, but you will see missing installs in the above if not.

Resources