I am using tensorflow in a python module, which is called by a c++ file. I moved to a new computer, where I installed ros again. So it works on one computer, but not on the other. There I got the following error:
UserWarning: h5py is running against HDF5 1.10.0 when it was built against 1.10.4, this may cause problems '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
then I did:
pip2.7 uninstall h5py
pip2.7 install h5py==1.10.4
but then I get the following error:
No handlers could be found for logger "keyring.backend"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement h5py==1.10.4 (from versions: 2.2.1, 2.3.0b1, 2.3.0, 2.3.1, 2.4.0b1, 2.4.0, 2.5.0, 2.6.0, 2.7.0rc2, 2.7.0, 2.7.1, 2.8.0rc1, 2.8.0, 2.9.0rc1, 2.9.0, 2.10.0)
ERROR: No matching distribution found for h5py==1.10.4
It seems like there is no 1.10.4 version. What should I do?
I have to use python2.7. Also if I just let the python2.7 script run, it works. Only in conjunction with ros I get this error. But I think I take the python version from the same folder.
Thank you
Related
I am trying to install python version pypy2.7.1.1 using the following
pyenv install pypy2.7-7.1.1
I get the following error:
Downloading pypy2.7-v7.1.1-osx64.tar.bz2...
-> https://downloads.python.org/pypy/pypy2.7-v7.1.1-osx64.tar.bz2
Installing pypy2.7-v7.1.1-osx64...
Installing pip from https://bootstrap.pypa.io/get-pip.py...
error: failed to install pip via get-pip.py
BUILD FAILED (OS X 11.2.3 using 0000000000)
Inspect or clean up the working tree at /var/folders/zt/q3p12vyx3l990yc32wmybqdr0000gs/T/python-build.20210428193745.1720
Results logged to /var/folders/zt/q3p12vyx3l990yc32wmybqdr0000gs/T/python-build.20210428193745.1720.log
Last 10 log lines:
/var/folders/zt/q3p12vyx3l990yc32wmybqdr0000gs/T/python-build.20210428193745.1720 ~
/var/folders/zt/q3p12vyx3l990yc32wmybqdr0000gs/T/python-build.20210428193745.1720/pypy2.7-v7.1.1-osx64 /var/folders/zt/q3p12vyx3l990yc32wmybqdr0000gs/T/python-build.20210428193745.1720 ~
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
since pip was moved for 2.7 how do I install this now? is there a different way to install deprecated versions of python now?
I was having a similar issue on Mac OS 10.15.7 (Catalina).
This is how I was finally able to install Python 2.7 via pyenv
export GET_PIP_URL=https://bootstrap.pypa.io/pip/2.7/get-pip.py
PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA=openssl#1.0 pyenv install 2.7.5
I realize that you are trying to install pypy and not Python, but hopefully the method above helps you, or others!
Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgres connection. Actually I cannot install "psycopg2" in my environment. I searched for hours and implement every solutions I get from online but it does not work. Let me tell you what I did so far.
First it said to add Postgres in my PATH so I added C:\Program Files\PostgreSQL\12\bin\ in my PATH.
A new problem then arise with a huge ERROR report with 2 vital Error.
ERROR: Failed building wheel for psycopg2
..........................
Running setup.py install for psycopg2 ... error
I try to upgrade wheel but it says,
Requirement already up-to-date
http://initd.org/psycopg/docs/install.html#install-from-source
I learned from this site that psycopg2 requires python2 version. So I installed python 2.7 also.
I reinstalled PostgreSQL but it does not work.
I deleted my virtual environment and create again but it does not work.
Some says they solve this problem by running pip install psycopg2-binary But it does not work for me.
Please help me to get rid of this. I stuck for hours.
When you asked this question, Python 3.8 had been released very recently so there were not any wheels for Python 3.8 yet.
At the time, my suggestion was to install Python 3.7.X and install the binary wheel with:
pip install psycopg2-binary
Since then, binary wheels have been released for Python 3.8, so the above command should work with Python 3.8.X as well.
I wouldn't try to build from source on Windows if it can be avoided.
Finally, you misunderstood the section of the docs about Python 2. You only need Python 2.7 if you are running Python 2. For Python 3, which you should be using for all new projects, it currently supports Python 3.4 to 3.8.
use:
sudo apt install python3-dev libpq-dev
then try doing:
pip3 install psycopg2
Hope it works for you!!
This problem mainly occurs due to this -- " error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"
Now to install psycopg2, first you need to install visual studio from Microsoft - https://visualstudio.microsoft.com/visual-cpp-build-tools/
now you need to install the c++ desktop development tool with all its default components selected.
After successful visual studio c++ desktop development kit installation, you can now install psycopg2 successfully in your machine.
Python Version : 2.7.13
Pip Version: 9.0.1
Error: Could not find a version that satisfies the requirement libportaudio-dev(from version:)
No matching distribution found for libportaudio-dev
pip installs packages from PyPI and there is no libportaudio-dev at PyPI. It's not a Python package. It is a package in Ubuntu.
To install it on w32 you have to download the source code and compile it. See the instructions.
There are old precompiled binaries at https://github.com/adfernandes/precompiled-portaudio-windows
https://github.com/spatialaudio/portaudio-binaries — these ones look more fresh.
Env: Windows 10 Pro
I installed python 2.7.9 and using pip installed robotframework and robotframework-selenium2library and it all worked fine with no errors.
Then I was doing some research and found that unless there is a reason for me to use 2.x versions of Python, I should stick with 3.x versions. Since 3.4 support already exists for selenium2library (read somewhere), so I decided to switch to it.
I uninstalled python 2.7.9 and installed python 3.4 version. When I installed robotframerwork, I am getting the following:
C:\Users\username>pip install robotframework
Downloading/unpacking RobotFramework
Running setup.py (path:C:\Users\username\AppData\Local\Temp\pip_build_username\RobotFramework\setup.py) egg_info for package RobotFramework
no previously-included directories found matching 'src\robot\htmldata\testdata'
Installing collected packages: RobotFramework
Running setup.py install for RobotFramework
File "C:\Python34\Lib\site-packages\robot\running\timeouts\ironpython.py", line 57
raise self._error[0], self._error[1], self._error[2]
^
SyntaxError: invalid syntax
File "C:\Python34\Lib\site-packages\robot\running\timeouts\jython.py", line 56
raise self._error[0], self._error[1], self._error[2]
^
SyntaxError: invalid syntax
no previously-included directories found matching 'src\robot\htmldata\testdata'
replacing interpreter in robot.bat and rebot.bat.
Successfully installed RobotFramework
Cleaning up...
When I did pip list I do see robotframework is installed.
C:\Users\username>pip list
pip (1.5.4)
robotframework (3.0)
setuptools (2.1)
Should I be concerned and stick to Python 2.7.9?
If you are using python 3.x then u can install Selenium2Library using this
pip install https://github.com/HelioGuilherme66/robotframework-selenium2library/archive/v1.8.0a1.zip
With python 2.7.9 you can only install robotframework 2.9
With python 3.X you can install robotframework 3.x+ but as Bryan Oakley said, Selenium2Library is not yet supported ;)
I did sudo pip install numpy==1.8 to upgrade to the most recent version and it said the install was successful, but then I checked the numpy version again in the python shell and it's still importing 1.6.2. I went into the numpy directory at /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/ and it says the version is 1.6.2. I'm assuming that this is the version that came pre-installed. Where does the numpy upgrade get installed?
thnx