RuntimeError: Python version >= 3.5 required while installing the python libraries - python

I am using a virtual environment.
In that I am having a python version 3.7.0
virtualenv --python=python3.7 .env
Now, whenever I am trying to install any library over there ,it is giving me this error
Downloading/unpacking scikit-learn==0.20.2
Running setup.py (path:/tmp/pycharm-packaging421/scikit-learn/setup.py) egg_info for package scikit-learn
Partial import of sklearn during the build process.
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8.2 in /usr/local/lib/python3.4/dist-packages (from scikit-learn==0.20.2)
Downloading/unpacking scipy>=0.13.3 (from scikit-learn==0.20.2)
Running setup.py (path:/tmp/pycharm-packaging421/scipy/setup.py) egg_info for package scipy
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>
raise RuntimeError("Python version >= 3.5 required.")
RuntimeError: Python version >= 3.5 required.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>
raise RuntimeError("Python version >= 3.5 required.")
RuntimeError: Python version >= 3.5 required.
can any one help me with this ?

To use virtualenv in older version of python3 use this method.
Create:
python3 -m venv .venv
Activate:
source .venv/bin/activate
Exit:
deactivate
I test it on Python 3.4.2 in Debian 8.11

Related

Installing python package with setup.py

While installing mypy_extensions 0.4.3 i ran into
ValueError: ZIP does not support timestamps before 1980
First part of traceback before ValueError raised:
creating 'dist\mypy_extensions-0.4.3-py3.7.egg' and adding 'build\bdist.win-amd64\egg' to it
Traceback (most recent call last):
File "setup.py", line 43, in <module>
'typing >= 3.5.3; python_version < "3.5"',
Source Distribution was downloaded from: https://pypi.org/project/mypy-extensions/#files
As was recommended in What is setup.py? answers I try to install package with:
python setup.py install
But firstly extract the archive into some folder and select directory cd C:\Users\someuser\folder_with_unarchived_package
python ver is 3.7.0
What i do wrong?
Thank you in advance!

Python 3.6 Error when installing pip install gearman

I have been trying to install gearman on python 3.6 but I'm getting this error:
$ pip install gearman
Collecting gearman
Using cached gearman-2.0.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-build-xmf1cqe7/gearman/setup.py", line 5, in <module>
from gearman import __version__ as version
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/__init__.py", line 7, in <module>
from gearman.admin_client import GearmanAdminClient
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/admin_client.py", line 4, in <module>
from gearman import util
File "/tmp/pip-build-xmf1cqe7/gearman/gearman/util.py", line 62
except select_lib.error, exc:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xmf1cqe7/gearman/
I am using Ubuntu 16.04 LTS
pip -V -> pip 9.0.1 from [my_project_folder]/venv/lib/python3.6/site-packages (python 3.6)
python --version -> Python 3.6.2
How do I fix that?
The gearman package does not support Python 3. Only python 2.4-2.7 are supported according to their setup.py. There is an open pull request to add python 3 support but it has been untouched for a year. I believe that Yelp! may have stopped supporting this library.
You use python3 and in python3
Use as instead:the raise syntax no longer accepts comma-separated arguments.
The gearman is not the Python 3 version, you can check the link https://pypi.python.org/pypi/gearman

Python 3.5.1 Cannot download Robot Framework library

I'm new to Python and I'm trying to automate a test with Robot Framework. When I tried downloading the library via pip I ran into some issues.
I'm using Python 3.5.1, Robot Framework 3.0, PyCharm 2016.1(64),
Output for command pip install robotframework-selenium2library:
Collecting robotframework-selenium2library
Using cached robotframework-selenium2library-1.7.4.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Extracting in C:\Users\Radek\AppData\Local\Temp\tmpooendh2g
Traceback (most recent call last):
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 143, in use_setuptools
raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\setup.py", line 8, in <module>
use_setuptools()
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 99, in _build_egg
_extractall(tar)
File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 467, in _extractall
self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\
Setuptools are up-to-date, so is ez_setup
C:\Users\Radek>pip install --upgrade setuptools
Requirement already up-to-date: setuptools in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages
C:\Users\Radek>pip install ez_setup
Requirement already satisfied (use --upgrade to upgrade): ez-setup in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages
Selenium2Library is not (yet) compatible with Python 3.x.
We have a Pull Request (github.com/robotframework/Selenium2Library/pull/564) to have Selenium2Library compatible with all Python versions, but it is not in the official Release, and it was tested with Python 2.6, 2.7 and 3.4.
I you want to install you could try github.com/HelioGuilherme66/robotframework-selenium2library/releases/tag/v1.8.0b1
For example with:
pip install -U --pre https://github.com/HelioGuilherme66/robotframework-selenium2library/archive/v1.8.0b1.zip

python-daemon 2.0.5 won't install with pip

I am getting errors when trying to install python-daemon 2.0.5 with pip & python 2.6. I know there are other questions that refer to python-daemon 2.0.3 having this problem. But those answers indicate it should be fixed now.
I've tried installing older versions as well without luck. Although if I start over with a fresh virtualenv I am able to install 1.5.6 . However in this virtualenv I get the same error with 2.0.5 and 1.5.6
(py26)[brianb#api proj]$ pip install python-daemon
Downloading/unpacking python-daemon
Downloading python-daemon-2.0.5.tar.gz (71Kb): 71Kb downloaded
Running setup.py egg_info for package python-daemon
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/brianb/py26/build/python-daemon/setup.py", line 26, in <module>
import version
File "version.py", line 438
for item in versions}
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/brianb/py26/build/python-daemon/setup.py", line 26, in <module>
import version
File "version.py", line 438
for item in versions}
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/brianb/.pip/pip.log
This is strange! I tried to upgrade virtualenv too, but this did not work out.
To get it running, I had to upgrade to Python 2.7.

unable to import evernote.api.client (evernte sdk)

i'm trying to get started with evernote SDK , i'm using ubuntu 13.04
i installed the SDK via :
pip install evernote
but when i want to test it using :
python -c 'from evernote.api.client import EvernoteClient'
i got this :
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named api.client
What is the problem ?
EDIT : pip install evernote works fine i guess , it gives me this :
Requirement already satisfied (use --upgrade to upgrade): evernote in /usr/local/lib/python2.7/dist-packages/evernote-1.24.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): oauth2 in /usr/lib/python2.7/dist-packages (from evernote)
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/lib/python2.7/dist-packages (from oauth2->evernote)
Cleaning up...
here is the turorial : http://dev.evernote.com/start/guides/python.php
This is pretty old already, but I bet more people will hit it, so I'll put the answer here. It seems to be a surprisingly common issue that doesn't have an answer anywhere.
Note how the error complains about api.client but not evernote.
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named api.client
Most likely, the problem is that OP has a script in his path called evernote.py, which I guess is a common name people use to name their first evernote script. Rename the script to something less obvious and that should do the trick.
Looks like
pip install evernote don't do what it is suppose to do:
cat /etc/SuSE-release
openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
pip install evernote
Downloading/unpacking evernote
Downloading evernote-1.24.0.macosx-10.8-x86_64.tar.gz (326kB): 326kB downloaded
Running setup.py egg_info for package evernote
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/evernote/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/evernote/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/evernote
Storing complete log in /root/.pip/pip.log
You can fix that with:
pip -v install evernote==1.23.2
and everything works just fine!
Could you check the version of Evernote SDK for Python with:
pip freeze
If import evernote works but from evernote.api.client import EvernoteClient doesn't, you might happen to use 1.23.0 version or older since EvernoteClient class was introduced in 1.23.1.
Also please check your site-packages directory to make sure any older version is not loaded.

Categories

Resources