Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to pip install godirect #23

Open
AsafAsher opened this issue Jun 18, 2021 · 1 comment
Open

unable to pip install godirect #23

AsafAsher opened this issue Jun 18, 2021 · 1 comment

Comments

@AsafAsher
Copy link

When trying to install the godirect package it requires the pythonnet package and raises an error.
is the pythonnet necessary because I can't find its use in the code.

see below------

C:\Users\asafa>pip install pythonnet
Collecting pythonnet
Using cached pythonnet-2.5.2.tar.gz (1.9 MB)
Requirement already satisfied: pycparser in c:\users\asafa\appdata\local\programs\python\python39\lib\site-packages (from pythonnet) (2.20)
Using legacy 'setup.py install' for pythonnet, since package 'wheel' is not installed.
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\asafa\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\asafa\AppData\Local\Temp\pip-install-06v_3t3e\pythonnet_29af4c179f7546eabe08fc2e7b2b0608\setup.py'"'"'; file='"'"'C:\Users\asafa\AppData\Local\Temp\pip-install-06v_3t3e\pythonnet_29af4c179f7546eabe08fc2e7b2b0608\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'"'"'))' install --record 'C:\Users\asafa\AppData\Local\Temp\pip-record-z0gpg_03\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\asafa\appdata\local\programs\python\python39\Include\pythonnet'
cwd: C:\Users\asafa\AppData\Local\Temp\pip-install-06v_3t3e\pythonnet_29af4c179f7546eabe08fc2e7b2b0608
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: option --single-version-externally-managed not recognized
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\asafa\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\asafa\AppData\Local\Temp\pip-install-06v_3t3e\pythonnet_29af4c179f7546eabe08fc2e7b2b0608\setup.py'"'"'; file='"'"'C:\Users\asafa\AppData\Local\Temp\pip-install-06v_3t3e\pythonnet_29af4c179f7546eabe08fc2e7b2b0608\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'"'"'))' install --record 'C:\Users\asafa\AppData\Local\Temp\pip-record-z0gpg_03\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\asafa\appdata\local\programs\python\python39\Include\pythonnet' Check the logs for full command output.

@stocktonkincade
Copy link
Contributor

This is a Windows, Python 3.9 problem only. We will add the following details to the documentation.

The godirect module includes a dependency called pythonnet that currently does not install with pip on Windows running Python version 3.9. Until this issue is fixed, this dependency must be installed directly from a wheel file, prior to installing godirect. Follow these steps:

  1. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pythonnet
  2. Download the wheel file for pythonnet that is appropriate for your system.
    For 64-bit Python: pythonnet‑2.5.2‑cp39‑cp39‑win_amd64.whl
    For 32-bit Python: pythonnet‑2.5.2‑cp39‑cp39‑win32.whl
  3. Run the following command, where "path to wheel file" is the full path to the wheel file you just downloaded

    pip install path to wheel file
    (for example, pip install C:\Users\jdoe\Downloads\pythonnet-2.5.2-cp39-cp39-win_amd64.whl)

  4. Install godirect as normal

    pip install godirect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants