Repository navigation
Closed
Description
Environment
- Pythonnet version: latest mater from github
- Python version: Pytnon 3.6.5:: Anaconda, Inc.
- Operating System: osx 10.12.3
Details
-
Describe what you were trying to get done.
Install pythonnet by following the instrucion from: https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python
-
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Lean> python setup.py
- Screen output:
Python support in Lean with pythonnet
=====================================
Prerequisites:
- Python 3.6 x64 with pip
- LEAN: https://github.com/QuantConnect/Lean#installation-instructions
- pkg-config: http://macappstore.org/pkg-config/
- git
It will update conda, pip, wheel, setuptools, pandas packages.
Install/updates required packages
---------------------------------
[conda] Successfully installed/updated: setuptools, pip, pandas, wheel, conda
Install/updates pythonnet
-------------------------
Command "/Users/kevinyuan/works/quantconnect/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-req-build-axne_ulw/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/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-record-wq_0j0dj/install-record.txt --single-version-externally-managed --compile --install-headers /Users/kevinyuan/works/quantconnect/include/site/python3.6/pythonnet" failed with error code 1 in /private/var/folders/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-req-build-axne_ulw/
Collecting git+https://github.com/QuantConnect/pythonnet
Cloning https://github.com/QuantConnect/pythonnet to /private/var/folders/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-req-build-axne_ulw
Installing collected packages: pythonnet
Running setup.py install for pythonnet: started
Running setup.py install for pythonnet: finished with status 'error'
Complete output from command /Users/kevinyuan/works/quantconnect/bin/python -u -c "import setuptools, tokenize;__file__=\'/private/var/folders/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-req-build-axne_ulw/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/9s/rdkm24152qq5tv0jg76pcmyc0000gn/T/pip-record-wq_0j0dj/install-record.txt --single-version-externally-managed --compile --install-headers /Users/kevinyuan/works/quantconnect/include/site/python3.6/pythonnet:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Metadata
Metadata
Assignees
Labels
No labels
Activity
den-run-ai commentedon Sep 5, 2018
@kevinyuan have you tried passing
--eggoption to pip?yok0 commentedon Sep 10, 2018
@denfromufa the --egg option has been deprecated and is no longer valid workaround. Im trying to install 'pythonnet' on macOS myself and have been unsuccessful for hours now.
@kevinyuan solution to your issue is here:
https://stackoverflow.com/questions/14296531/what-does-error-option-single-version-externally-managed-not-recognized-ind
den-run-ai commentedon Sep 10, 2018
@yok0 for mac osx please see instructions here:
https://github.com/pythonnet/pythonnet/wiki/Troubleshooting-on-Windows,-Linux,-and-OSX#osx-notes
gdw2 commentedon Oct 19, 2018
I've tried the stackoverflow suggestions recommended by @yok0, namely updating wheel and setuputils, and am still getting the same error.
den-run-ai commentedon Oct 20, 2018
@gdw2 at least you should be able to build/install from extracted pythonnet directory like described in wiki. PRs are welcome to get rid of
--eggoption. I think it got somehow unintentionally added in 2016-2017.eric-appion commentedon Feb 21, 2020
I'm not convinced that this problem has actually been resolved. On Windows 10, I have just installed Python 3.8.1, then upgraded pip, setuptools, and wheel to the latest versions. The "--egg" option has been removed, so I can't use that, and when I try "pip install pythonnet" I still get "error: option --single-version-externally-managed not recognized".
onepip commentedon Mar 13, 2020
updating wheel and setuputils, and am still getting the same error.
HunterTom94 commentedon Mar 28, 2020
I am using Python 3.8.2 on Win10. I am getting the same error as well.
huska6 commentedon Apr 3, 2020
same for me Python 3.8.2. 64bit, Win10, all above tested, I still have this problem.
filmor commentedon Apr 3, 2020
Python 3.8 is not yet supported.
lostmsu commentedon May 5, 2020
This happens in conda envs with 3.7 and 3.6 too.
filmor commentedon Jun 11, 2020
The problem happens in some environments because we conditionally require
pycparser(i.e. it's not usually installed withpip install pythonnetbut required whenever the DLL/SO is not one for which we provide theinterop*.csin our repo). It happened in Python 3.8 while it was unsupported and it happens in conda as they always use themvariant.I'll fix this by always requiring
pycparserin thesdist.filmor commentedon Jun 11, 2020
This particular issue on the other hand is with Quantconnect's fork of pythonnet, I won't provide any support for that.