I am attempting to replicate an environment from an old VM from 2019 that runs the following:
Old Environment:
Ubuntu 18.10 (GNU/Linux 4.18.0-1015-gcp x86_64)
pip 21.1.3
Python 3.6.8
The above environment is no longer available in GCP due to the unsupported Linux version. The new environment is the following:
New Environment:
Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-1086-gcp x86_64)
pip 21.1.3
Python 3.6.8 (installed with pyenv)
Here is the discrepancy. On the old VM created in 2019 running Ubuntu 18.10 I can successfully install a package:
pip3 install bcolz==1.2.1 --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Collecting bcolz==1.2.1
Downloading bcolz-1.2.1.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 5.4 MB/s
Requirement already satisfied: numpy>=1.7 in ./.local/lib/python3.6/site-packages (from bcolz==1.2.1) (1.19.4)
Building wheels for collected packages: bcolz
Building wheel for bcolz (setup.py) ... \^done
Created wheel for bcolz: filename=bcolz-1.2.1-cp36-cp36m-linux_x86_64.whl size=3422243 sha256=2cc8e75db5c19a9117b6addbf5861d5f1640b63f13763f4c5d54de77f3fa7afb
Stored in directory: /tmp/pip-ephem-wheel-cache-fiauus63/wheels/24/66/8c/9b17f3eaf898f87ae735bc0ae5991efd63adf9e9253b9b038e
Successfully built bcolz
Installing collected packages: bcolz
Successfully installed bcolz-1.2.1
On the new VM running Ubuntu 18.04 LTS I get the following error:
pip3 install bcolz==1.2.1 --no-cache-dir
Collecting bcolz==1.2.1
Downloading bcolz-1.2.1.tar.gz (1.5 MB)
|████████████████████████████████| 1.5 MB 5.4 MB/s
ERROR: Command errored out with exit status 1:
command: /home/vincentfperkins/.pyenv/versions/3.6.8/bin/python3.6 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcp07gq_/bcolz_c30f4aea994c410b87fb40c31ae10c28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bcp07gq_/bcolz_c30f4aea994c410b87fb40c31ae10c28/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-05d5vn_i
cwd: /tmp/pip-install-bcp07gq_/bcolz_c30f4aea994c410b87fb40c31ae10c28/
Complete output (24 lines):
SSE2 detected
AVX2 detected
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-bcp07gq_/bcolz_c30f4aea994c410b87fb40c31ae10c28/setup.py", line 234, in <module>
cmdclass=LazyCommandClass(),
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/site-packages/setuptools/dist.py", line 442, in __init__
k: v for k, v in attrs.items()
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/site-packages/setuptools/dist.py", line 601, in finalize_options
ep.load()(self, ep.name, value)
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
return self.resolve()
File "/home/vincentfperkins/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/tmp/pip-install-bcp07gq_/bcolz_c30f4aea994c410b87fb40c31ae10c28/.eggs/setuptools_scm-7.0.5-py3.6.egg/setuptools_scm/__init__.py", line 5
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
Would someone be able to explain why the package installation fails in the new system despite very similar specs to the old system? I feel like some inner workings of pip installations have changed since 2019. I may have to upgrade from using Python 3.6 as a whole, but I wanted to know if anyone had any clues.
Thank you!