eawag-rdm / resup

Batch upload and download of resources to and from data package in CKAN.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation apparently works but shows errors, ckanapi building twice

meowcat opened this issue · comments

During pip install -r requirements.txt on conda 4.10.1, in a pristine python 2.7 environment, the following error message shows up. The installation seems to be working anyway; and it would naively seem that the issue is that ckanapi is installed twice?

C:\Daten\git\resup>pip install -r requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting requests[socks]
  Downloading https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63kB)
     |################################| 71kB 4.0MB/s
Collecting ckanapi-streaming
  Cloning https://github.com/eawag-rdm/ckanapi-streaming.git to c:\users\xxx\appdata\local\temp\pip-install-4dld6e\ckanapi-streaming
  Running command git clone -q https://github.com/eawag-rdm/ckanapi-streaming.git 'c:\users\xxx\appdata\local\temp\pip-install-4dld6e\ckanapi-streaming'
  WARNING: Generating metadata for package ckanapi-streaming produced metadata for project name ckanapi. Fix your #egg=ckanapi-streaming fragments.
Collecting urllib3<1.27,>=1.21.1
  Using cached https://files.pythonhosted.org/packages/4e/b8/f5a25b22e803f0578e668daa33ba3701bb37858ec80e08a150bd7d2cf1b1/urllib3-1.26.8-py2.py3-none-any.whl
Requirement already satisfied: certifi>=2017.4.17 in c:\software\anaconda3\envs\resup\lib\site-packages (from requests[socks]->-r requirements.txt (line 1)) (2020.6.20)
Collecting idna<3,>=2.5; python_version < "3"
  Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting chardet<5,>=3.0.2; python_version < "3"
  Using cached https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl
Collecting PySocks!=1.5.7,>=1.5.6; extra == "socks"
  Downloading https://files.pythonhosted.org/packages/a2/4b/52123768624ae28d84c97515dd96c9958888e8c2d8f122074e31e2be878c/PySocks-1.7.1-py27-none-any.whl
Collecting win-inet-pton; (sys_platform == "win32" and python_version == "2.7") and extra == "socks"
  Downloading https://files.pythonhosted.org/packages/be/31/ff772a44aa56319df8afbb0b34f1a856f66f05b9d5f1fed917849e47fdae/win_inet_pton-1.1.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\software\anaconda3\envs\resup\lib\site-packages (from ckanapi->-r requirements.txt (line 2)) (44.0.0.post20200106)
Collecting docopt
  Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting requests-toolbelt
  Downloading https://files.pythonhosted.org/packages/60/ef/7681134338fc097acef8d9b2f8abe0458e4d87559c689a8c306d0957ece5/requests_toolbelt-0.9.1-py2.py3-none-any.whl (54kB)
     |################################| 61kB 3.2MB/s
Collecting clint
  Downloading https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz
Collecting simplejson
  Downloading https://files.pythonhosted.org/packages/7a/47/c7cc3d4ed15f09917838a2fb4e1759eafb6d2f37ebf7043af984d8b36cf7/simplejson-3.17.6.tar.gz (83kB)
     |################################| 92kB 4.6MB/s
Collecting args
  Downloading https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz
Building wheels for collected packages: ckanapi, ckanapi, docopt, clint, simplejson, args
  Building wheel for ckanapi (setup.py) ... done
  Created wheel for ckanapi: filename=ckanapi-999.0.0-cp27-none-any.whl size=36978 sha256=115bd945713851adee94c772b329fe24ae407f91503ed92e2229424eda01d2f2
  Stored in directory: c:\users\xxx\appdata\local\temp\pip-ephem-wheel-cache-vcfupn\wheels\68\1c\49\c71927c304cf5e5a74e91312a93a1ac1114dc88b00ef254050
  Building wheel for ckanapi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Software\Anaconda3\envs\resup\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'"'"'; __file__='"'"'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'c:\users\xxx\appdata\local\temp\pip-wheel-tawp8l' --python-tag cp27
       cwd: c:\users\xxx\appdata\local\temp\pip-install-4dld6e\ckanapi\
  Complete output (3 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: 'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'
  ----------------------------------------
  ERROR: Failed building wheel for ckanapi
  Running setup.py clean for ckanapi
  ERROR: Command errored out with exit status 1:
   command: 'C:\Software\Anaconda3\envs\resup\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'"'"'; __file__='"'"'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: c:\users\xxx\appdata\local\temp\pip-install-4dld6e\ckanapi
  Complete output (3 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: 'c:\\users\\xxx\\appdata\\local\\temp\\pip-install-4dld6e\\ckanapi\\setup.py'
  ----------------------------------------
  ERROR: Failed cleaning build dir for ckanapi
  Building wheel for docopt (setup.py) ... done
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13779 sha256=d6f9cd2683a72011eeaaecafd44be0b620d7e1f7b7e8a9d2d3321c5fc1ccdfed
  Stored in directory: C:\Users\xxx\AppData\Local\pip\Cache\wheels\9b\04\dd\7daf4150b6d9b12949298737de9431a324d4b797ffd63f526e
  Building wheel for clint (setup.py) ... done
  Created wheel for clint: filename=clint-0.5.1-cp27-none-any.whl size=34486 sha256=cc36d38e05464eff63c1db134d46c3a9db56b7fb372b86b403e71546ab81c4bf
  Stored in directory: C:\Users\xxx\AppData\Local\pip\Cache\wheels\4f\e9\45\223565e5b1a4b09e12c6de6f8ba7c2c0e9127dec17cf830f83
  Building wheel for simplejson (setup.py) ... done
  Created wheel for simplejson: filename=simplejson-3.17.6-cp27-none-any.whl size=56345 sha256=b4a40cf03c76cae341644129c5502db9a4a3cee11967ae9e193e423d88981e25
  Stored in directory: C:\Users\xxx\AppData\Local\pip\Cache\wheels\03\8f\7e\d4209fac1725a2f4b341b0e7c13d101cd496e5327d7684a52a
  Building wheel for args (setup.py) ... done
  Created wheel for args: filename=args-0.1.0-cp27-none-any.whl size=3333 sha256=a834dd9bfb764dc3a63e0d8914c821c4e17b3952f88dadef503ed483a10794c9
  Stored in directory: C:\Users\xxx\AppData\Local\pip\Cache\wheels\58\54\ea\d995d18af68c057eb76b87b02c92bc66ac34d360ef141780f4
Successfully built ckanapi docopt clint simplejson args
Failed to build ckanapi
Installing collected packages: urllib3, idna, chardet, PySocks, win-inet-pton, requests, docopt, requests-toolbelt, args, clint, simplejson, ckanapi
Successfully installed PySocks-1.7.1 args-0.1.0 chardet-4.0.0 ckanapi-999.0.0 clint-0.5.1 docopt-0.6.2 idna-2.10 requests-2.27.1 requests-toolbelt-0.9.1 simplejson-3.17.6 urllib3-1.26.8 win-inet-pton-1.1.0

The subsequent python setup.py develop works fine, and so does resup itself, it seems.

This was on Windows 20H2. Same issue on Linux, Debian Bullseye.

Most likely caused by Anaconda. Please install resup using the standard pip in an Anaconda-free environment.