wandera / 1password-client

Python wrapper for OnePassword CLI developed at Wandera.
MIT License
47 stars 25 forks source link

pip install fails #15

Closed bkaskar closed 3 years ago

bkaskar commented 3 years ago

Please suggest how to proceed with using this package. While trying to install using pipenv the following error shows up:

pip install --ignore-installed 1password

Collecting 1password
  Using cached 1password-0.4.2.tar.gz (10 kB)
Collecting wget>=3.2
  Using cached wget-3.2-py3-none-any.whl
Collecting pyyaml>=5.4
  Using cached PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl (253 kB)
Collecting pycryptodome>=3.9.7
  Using cached pycryptodome-3.10.1-cp35-abi3-macosx_10_9_x86_64.whl (1.5 MB)
Building wheels for collected packages: 1password
  Building wheel for 1password (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/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 /private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-wheel-5d0o2e_2
       cwd: /private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/
  Complete output (57 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/onepassword
  copying onepassword/client.py -> build/lib/onepassword
  copying onepassword/__init__.py -> build/lib/onepassword
  copying onepassword/utils.py -> build/lib/onepassword
  copying onepassword/exceptions.py -> build/lib/onepassword
  warning: build_py: byte-compiling is disabled, skipping.

  installing to build/bdist.macosx-10.14.6-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.macosx-10.14.6-x86_64
  creating build/bdist.macosx-10.14.6-x86_64/wheel
  creating build/bdist.macosx-10.14.6-x86_64/wheel/onepassword
  copying build/lib/onepassword/client.py -> build/bdist.macosx-10.14.6-x86_64/wheel/onepassword
  copying build/lib/onepassword/__init__.py -> build/bdist.macosx-10.14.6-x86_64/wheel/onepassword
  copying build/lib/onepassword/utils.py -> build/bdist.macosx-10.14.6-x86_64/wheel/onepassword
  copying build/lib/onepassword/exceptions.py -> build/bdist.macosx-10.14.6-x86_64/wheel/onepassword
  warning: install_lib: byte-compiling is disabled, skipping.

  running install_egg_info
  running egg_info
  writing 1password.egg-info/PKG-INFO
  writing dependency_links to 1password.egg-info/dependency_links.txt
  writing requirements to 1password.egg-info/requires.txt
  writing top-level names to 1password.egg-info/top_level.txt
  reading manifest file '1password.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'LICENSE.txt'
  writing manifest file '1password.egg-info/SOURCES.txt'
  Copying 1password.egg-info to build/bdist.macosx-10.14.6-x86_64/wheel/1password-0.4.2-py3.8.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py", line 33, in <module>
      setup(
    File "/Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 335, in run
      self.run_command('install')
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py", line 19, in run
      from install_op import install_op
  ModuleNotFoundError: No module named 'install_op'
  ----------------------------------------
  ERROR: Failed building wheel for 1password
  Running setup.py clean for 1password
Failed to build 1password
Installing collected packages: wget, pyyaml, pycryptodome, 1password
    Running setup.py install for 1password ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-record-xt64amy3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/include/site/python3.8/1password
         cwd: /private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/
    Complete output (44 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/onepassword
    copying onepassword/client.py -> build/lib/onepassword
    copying onepassword/__init__.py -> build/lib/onepassword
    copying onepassword/utils.py -> build/lib/onepassword
    copying onepassword/exceptions.py -> build/lib/onepassword
    warning: build_py: byte-compiling is disabled, skipping.

    running install_lib
    warning: install_lib: byte-compiling is disabled, skipping.

    running install_egg_info
    running egg_info
    writing 1password.egg-info/PKG-INFO
    writing dependency_links to 1password.egg-info/dependency_links.txt
    writing requirements to 1password.egg-info/requires.txt
    writing top-level names to 1password.egg-info/top_level.txt
    reading manifest file '1password.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'LICENSE.txt'
    writing manifest file '1password.egg-info/SOURCES.txt'
    removing '/Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/lib/python3.8/site-packages/1password-0.4.2-py3.8.egg-info' (and everything under it)
    Copying 1password.egg-info to /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/lib/python3.8/site-packages/1password-0.4.2-py3.8.egg-info
    running install_scripts
    writing list of installed files to '/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-record-xt64amy3/install-record.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py", line 33, in <module>
        setup(
      File "/Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py", line 19, in run
        from install_op import install_op
    ModuleNotFoundError: No module named 'install_op'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py'"'"'; __file__='"'"'/private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-install-2jclt5es/1password_c7361963bbe343dbaea8912ef55e507d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/j0/jk6xchf50jscdvq5xk4q9ct00000gn/T/pip-record-xt64amy3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/roybUsr/.local/share/virtualenvs/oppy-test-zXvBruzx/include/site/python3.8/1password Check the logs for full command output.

Thanks

dtpryce commented 3 years ago

I think I know what's happened here ... Missing file in MANIFEST. Fixed in 0.4.3 :) try now?

bkaskar commented 3 years ago

Thank you for the quick fix!! pip install --ignore-installed 1password

Collecting 1password
  Downloading 1password-0.4.3.tar.gz (11 kB)
Collecting wget>=3.2
  Using cached wget-3.2-py3-none-any.whl
Collecting pyyaml>=5.4
  Using cached PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl (253 kB)
Collecting pycryptodome>=3.9.7
  Using cached pycryptodome-3.10.1-cp35-abi3-macosx_10_9_x86_64.whl (1.5 MB)
Building wheels for collected packages: 1password
  Building wheel for 1password (setup.py) ... done
  Created wheel for 1password: filename=1password-0.4.3-py3-none-any.whl size=9454 sha256=8557b636ab7ef3b0a4737c095a2904df71c1abbcf2e2657a7c83a18207696701
  Stored in directory: /Users/broy/Library/Caches/pip/wheels/e8/f7/2c/6c9d68fd289c9c380e9ba0a29eca831bb188dbb2f7a61d9eb0
Successfully built 1password
Installing collected packages: wget, pyyaml, pycryptodome, 1password
Successfully installed 1password-0.4.3 pycryptodome-3.10.1 pyyaml-5.4.1 wget-3.2
dtpryce commented 3 years ago

No worries at all 😊 feel free to raise another issue if something else doesn't work! Have a great weekend 🎉