Repository navigation
Closed
Labels
Description
C:\Windows\system32>pip install git+https://github.com/pythonnet/pythonnet
Collecting git+https://github.com/pythonnet/pythonnet
Cloning https://github.com/pythonnet/pythonnet to c:\users\denis~1.akh\appdata\local\temp\pip-so1nbo-build
Requirement already satisfied (use --upgrade to upgrade): pythonnet==2.4.0.dev0 from git+https://github.com/pythonnet/pythonnet in c:\python\python27-32\lib\site-packages
C:\Windows\system32>pip install git+https://github.com/pythonnet/pythonnet -U
Collecting git+https://github.com/pythonnet/pythonnet
Cloning https://github.com/pythonnet/pythonnet to c:\users\denis~1.akh\appdata\local\temp\pip-ytahwe-build
Installing collected packages: pythonnet
Found existing installation: pythonnet 2.4.0.dev0
Uninstalling pythonnet-2.4.0.dev0:
Successfully uninstalled pythonnet-2.4.0.dev0
Running setup.py install for pythonnet ... error
Complete output from command c:\python\python27-32\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\denis~1.akh\\appdata\\local\\temp\\pip-ytahwe-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\denis~1.akh\appdata\local\temp\pip-3dupcl-record\install-record.txt --single-version-externally-managed --compile:
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
----------------------------------------
Rolling back uninstall of pythonnet
Command "c:\python\python27-32\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\denis~1.akh\\appdata\\local\\temp\\pip-ytahwe-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\denis~1.akh\appdata\local\temp\pip-3dupcl-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\denis~1.akh\appdata\local\temp\pip-ytahwe-build\
Activity
vkhombal commentedon Oct 18, 2017
I have the same problem
den-run-ai commentedon Oct 18, 2017
vkhombal commentedon Oct 19, 2017
hi, thanks.
hi, i tried
python setup.py bdist_wheel --xplatthis gives
PS: I'm trying this on OSX
den-run-ai commentedon Oct 19, 2017
Remove
--xplatto use Mono instead of .NET Core.den-run-ai commentedon Oct 24, 2017
Related, thanks to @dmitriyse and @hjaekel for the deprecated
--eggtemp workaround:#562 (comment)
vkhombal commentedon Oct 24, 2017
On OSX for the following worked.
Thank you @denfromufa
den-run-ai commentedon Oct 24, 2017
@vkhombal don't forget to star the repo :)
I added the link to your instructions for mac here:
#465
nsbruce commentedon Nov 6, 2017
Pitching in here, I've been trying to get pythonnet installed for a few days on macOS 10.13.1 with no luck. I've tried all of the work-arounds and solutions which I've found between here and #465.
Obvious differences between setups like @vkhombal's and mine is that I'm using MacPorts instead of Homebrew, and that since the
port install monoinstalls an older version, I build from the .pkg at mono-project.com (so I'm running v5.4.0).From above,
python setup.py bdist_wheelfails withsubprocess.CalledProcessError: Command 'pkg-config --libs mono-2' returned non-zero exit status 1Any advice is appreciated. I've starred the repo and will update if I figure anything out.
den-run-ai commentedon Nov 7, 2017
@nsbruce more detailed error would be really helpful, but my understanding is that macports is a lot less used than homebrew and so we cannot support yet another scenario.
Also please provide versions for all dependencies.
nsbruce commentedon Nov 8, 2017
Dependency versions:
When I run
sudo python setup.py bdist_wheel(without sudo it doesn't run):nsbruce commentedon Nov 8, 2017
I've found mono-2.pc at
/Library/Frameworks/Mono.framework/Versions/5.4.0/lib/pkgconfig/mono-2.pcI tried to link it into
/local/libwith:But I see the same error,
I thought that
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/5.4.0/lib/pkgconfigwould definitely do it, but no.Something funky is going on. The above doesn't make sense to me. I'll update this comment as I go.
I'm trying to force mono-2 into the path but there must be an issue with the order of my PATH variable? Similar issue
Currently, for me:
den-run-ai commentedon Nov 8, 2017
@nsbruce please downgrade to mono 5.2, there is a bug with mono 5.4, it fails few tests.
nsbruce commentedon Nov 8, 2017
@denfromufa same error at 5.2.0.224
den-run-ai commentedon Nov 10, 2017
@nsbruce like I mentioned, macports is not supported scenario for pythonnet and mono. please move your comments from this issue to a new issue with title about macports and osx. someone may have done this before:
https://mail.python.org/pipermail/pythondotnet/2013-June/001383.html
den-run-ai commentedon Jan 28, 2018
Side effect of this
--egginstallation option is thatpip uninstall pythonnetdoes not remove the files correctly:Python.Runtime.dll and clr.pyd are left in place.
den-run-ai commentedon May 29, 2018
somehow this is now fixed with latest pip:
eric-appion commentedon Feb 21, 2020
I'm using Python 3.8.1 with pip 20.0.2 on Windows 10, and when I do a "pip install pythonnet", I still get --single-version-externally-managed not recognized.
cnaccio commentedon Oct 1, 2020
Running Python 3.8.5 with Mono 6.10.0 on OSX Catalina, as able to get pip install pythonnet by setting a PKG_CONFIG_PATH as below. Hope this helps!
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfigsorenwacker commentedon Jan 19, 2021
This path does not seem to exist on Linux systems. Is there an alternative?