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
Related
I need to open SVS images in Python 3.7 and it seems that Openslide is the only module capable of opening images of that size (30k*30k pixels). I have used pip install openslide-python as well as python -m pip install openslide-python and pip 3 install... etc.
I know the module has been successfully installed because if I run any of those commands again the command line returns requirement already satisfied however when I run Python and try to import openslide it gives the error at the bottom.
My guess was that the .whl or .tar.gz files were in the wrong path so I made a bunch of copies and put them in the openslide folders within the Anaconda3 folder. The error persists. I have included the full error code below for clarity.
Extra: If I run help("modules") openslide shows up along with numpy, math, sklearn etc. I can import and run all other modules without issue.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\brimk\Anaconda3\lib\site-packages\openslide\__init__.py", line 29, in <module>
from openslide import lowlevel
File "C:\Users\brimk\Anaconda3\lib\site-packages\openslide\lowlevel.py", line 41, in <module>
_lib = cdll.LoadLibrary('libopenslide-0.dll')
File "C:\Users\brimk\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users\brimk\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
My issue was resolved by the answer from my hero!
It seems that, at least for Openslide, running Python from the Path to the Bin is the easiest solution. It can be done this way.
Download the Windows Binary here.
Extract the download to whatever path you want.
Open command window
pip3 install openslide-python (pip2 if Python 2)
cd C:\Users\Path\to\Openslide-Win64-20171122\bin
python
import openslide
In the future you will have to run python from the path to the Openslide bin (Step 4). This can be done more rigorously by adding that file path to the PATH as described in detail here as well as in the answer above.
I'm trying to send Gmail through python3. I can use the email and smptlib, but I wanted to try out pyzmail.
However, when I try to install pyzmail, I get this:
$ pip3 install pyzmail
Collecting pyzmail
Using cached https://files.pythonhosted.org/packages/23/9a/c8709821fa15cec44f825fba884284b261a06d8a0033a16f4c35470eb26a/pyzmail-1.0.3.tar.gz
Collecting distribute (from pyzmail)
Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8r/50c4fq6j70q0qmhvwxvr00fw0000gn/T/pip-install-v4ervkb7/distribute/
I tested installing a different pip module but everything seemed to be in order.
I also tried easy_install but it installed for python 2.7, and not 3.
I think it might be something about my setuptools, but I don't know what needs to be done.
The pyzmail packages seems to be inactive now as the last commit and the last release were made 4 years ago. It does not seem to be updated for Python 3.6+.
There was an issue posted on the package's github page with the same error as yours: https://github.com/aspineux/pyzmail/issues/15. Someone posted a patch as a workaround but the best solution is to use pyzmail36 instead:
Tagging #cfenollosa #GheloAce in case you're still using this library
and are looking for a more maintainable way forward.
This repository unfortunately seems inactive, so I created a new
package on PyPI that includes all the fixes to make pyzmail
pip-installable on Python 3.6.
The name of the new package is pyzmail36. You can just update your
requirements.txt file to list pyzmail36 instead of pyzmail and all of
the rest of your code shouldn't need to change.
So just try with:
pip3 install pyzmail36
There are several ways to install pyzmail such as:
Try to use " pip install pyzmail36" by installing Python 3.6 first on your device.
Try to update the setup-tools by typing "pip install setuptools==20.1.1" and then install pyzmail.
Try to search for easy_install on Python 3.x, I have found several links for that.
Good luck.
I have a bug (ussue #14 on github) in my python project rma. Installing it trow pip 1.5.4 with python 3.4 some got error like this:
Downloading/unpacking rma
Downloading rma-0.1.5.tar.gz
Running setup.py (path:/tmp/pip_build_root/rma/setup.py) egg_info for package rma
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/rma/setup.py", line 47
setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/rma/setup.py", line 47
setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])
^
SyntaxError: invalid syntax
----------------------------------------
My own pip version 8.0.2 (python is 3.5).
I newby in python, sorry if this well known issue. I want to know - should i found way to fix it (if this is my issue) or just recommend to update pip to my user?
That package won't install on any Python version < 3.5, because the syntax is indeed invalid on anything but Python 3.5 and newer.
You can't put the **kwargs syntax in front of other keyword arguments. The two should be swapped:
setup(install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'], **sdict)
Reporting this as a bug was the correct thing to do; the package states it supports Python 3.4 and up.
Python 3.5 added support for an arbitrary number of *args and **kwargs expansions through PEP 448, opening the door for the above to work too.
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.
Does unirest support python3? I have googled and zero information comes up. Even in the unirest documentation it does not say it is 2.x only which leads me to believe it supports both 3.x and 2.x. However the install fails with 3.4 and succeeds with 2.7. See below.
nkltss:~/dev$ mkvirtualenv mashape -p /usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in mashape/bin/python3
Also creating executable in mashape/bin/python
Installing setuptools, pip...done.
(mashape)nkltss:~/dev$ pip install unirest
Downloading/unpacking unirest
Downloading Unirest-1.1.6.tar.gz
Running setup.py (path:/home/nick/.virtualenvs/mashape/build/unirest/setup.py) egg_info for package unirest
warning: no files found matching '*.txt' under directory 'docs'
Downloading/unpacking poster>=0.8.1 (from unirest)
Downloading poster-0.8.1.tar.gz
Running setup.py (path:/home/nick/.virtualenvs/mashape/build/poster/setup.py) egg_info for package poster
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/nick/.virtualenvs/mashape/build/poster/setup.py", line 2, in <module>
import poster
File "/home/nick/.virtualenvs/mashape/build/poster/poster/__init__.py", line 29, in <module>
import poster.streaminghttp
File "/home/nick/.virtualenvs/mashape/build/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/nick/.virtualenvs/mashape/build/poster/setup.py", line 2, in <module>
import poster
File "/home/nick/.virtualenvs/mashape/build/poster/poster/__init__.py", line 29, in <module>
import poster.streaminghttp
File "/home/nick/.virtualenvs/mashape/build/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/nick/.virtualenvs/mashape/build/poster
Storing debug log for failure in /home/nick/.pip/pip.log
For now I am using 2.7 but I prefer to use 3.x for new projects.
The project is not Python 3 compatible. When the project doesn't explicitly state this (not in the setup.py trove classifiers nor in documentation), you'll have to look at the source code.
There I find:
no use_2to3 use in setup to automatically rewrite code on install
imports for urllib2, a Python 2 only library.
The project depends on the poster library, which is also urllib2 specific.
I'd use the requests library instead. It supports Python 3 out of the box, and apart from asynchronous requests it supports the same feature set (but better as it doesn't have the shortcomings urllib2 brings along). For asynchronous requests, you can add on requests-futures.