It appears I'm unable to run the arm64 architecture in PyCharm and I don't understand why. I would really like to learn what I'm doing wrong.
Specs
I'm on a 2021 M1 MacBook Pro with macOs Monterey 12.6.2
PyCharm 2022.3.2 (Community Edition)
Runtime version: 17.0.5+1-b653.25 aarch64
For my virtual environments I use conda (miniforge3) version 4.14.0
When I run 'uname -m' in the PyCharm terminal it returns 'x86_64', however when I run the same command in zsh terminal I get 'arm64'. Both are executed in the conda 'base' environment and I would have expected the architectures to be the same.
What I've done
Downloaded PyCharm aarch64 (I was previously on x86_64), yielded the same result
Create specific arm64 and x86_64 conda environments, all return x86_64
Followed the steps in this thread arch x86_64 and arm64e is available but python3 is saying incompatible architecture on Mac M1
Thanks in advance for your help!
The issue is solved by deleting the current version of PyCharm and removing the left over ID directories as explained here https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#logs-directory
After re-installing PyCharm it now works!
Related
I am recieving this error when installing and running
from ortools.constraint_solver import pywrapcp
after following this guide. https://developers.google.com/optimization/install/python/mac
I am using a 2019 MacBook Pro (V 12.4, Python 3.9.4), which is x86, and not M1. However, the error is regarding the module not being compatible with M1 Macs, which should not apply. All information available online is about the error regarding M1 Macs. Any help is appreciated!
ImportError: dlopen([path], 0x0002): tried: '[path]/my_env/lib/python3.9/site-packages/ortools/linear_solver/_pywraplp.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h'))
M1 only wheel package have been named universal2 by pypa tools so any intel based mac currently pull it -> runtime issue.
On my way to fix our upload and release script, sorry for the inconvenience...
note: issue tracked in https://github.com/google/or-tools/issues/3436
note2: one workaround would be to download "locally" the correct wheel package then install it cd <you_download_dir>; python -m pip install --find-links=. ortools
try forcing the arch to x64_64.
For some reason, brew python tags aarch64 wheel as universal, and x86_64 as x86_64.
macOS version: 11.2.2
Xcode version: 11.5 (command line tools installed)
>>> gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I uninstalled Python 3.8.2 to reinstall it with tkinter configuration. When I tried to reinstall Python with pyenv, I keep getting the "error: C compiler cannot create executables".
I've seen other people ask a similar question and their problem is usually solved by installing the Xcode command line tools. I have tried this multiple times and it didn't solve the issue. Is there anything else I can try?
What I'm getting for gcc -v seems a little strange, perhaps it's an issue with that?
Any help would be extremely appreciated.
I have installed python3 via brew (although python still uses the macOS version):
➜ ~ which python3
/opt/homebrew/bin/python3
➜ ~ which python
/usr/bin/python
➜ ~
I believe changing python to brew may create system instabilities. I have explicitly set python3 to use brew (i.e. "python.pythonPath": "/opt/homebrew/bin/python3").
Upon installation of the ms-python.python extension, I get these two errors:
workbench.desktop.main.js:734: workbench.desktop.main.js:1904: Activating extension 'ms-python.python' failed: Expected a string, got undefined.
workbench.desktop.main.js:1904: Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information.
Here is the information about VSCode:
Version: 1.55.2 (Universal)
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:36:32.643Z (1 wk ago)
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin arm64 20.3.0
(MacOS version 11.2.3: BigSur)
I have tried a older versions of the extension and they don't work. Any thoughts?
https://stackoverflow.com/users/2654002/ian-huff
https://stackoverflow.com/users/15093821/luciana-abud
Potentially related to
Unable to install extension 'ms-python.python' as it is not compatible with VS Code '1.39.2'
Error loading Python for VS Code IntelliCode
I installed theano but when I try to use it I got this error:
WARNING (theano.configdefaults): g++ not detected! Theano will be unable to execute
optimized C-implementations (for both CPU and GPU) and will default to Python
implementations. Performance will be severely degraded.
I installed g++, and put the correct path in the environment variables, so it is like theano does not detect it.
Does anyone know how to solve the problem or which may be the cause?
I had this occur on OS X after I updated XCode (through the App Store). Everything worked before the update, but after the update I had to start XCode and accept the license agreement. Then everything worked again.
On Windows, you need to install mingw to support g++. Usually, it is advisable to use Anaconda distribution to install Python. Theano works with Python3.4 or older versions. You can use conda install command to install mingw.
I solved this probelm just now on Windows 10 with Anaconda3.
First apply
conda install mingw
in the command line.
If one comes across this problem
CondaIOError:
IO error: Missing write permissions in: C:\ProgramData\Anaconda3"
change the attribute in the safety tab of the folder in which you installed Anaconda; make sure user has write permissions to this folder.
This is the error that I experienced in my mac running jupyter notebook with a python 3.5 kernal hope this helps someone, i am sure rggir is well sorted at this stage :)
Error
Using Theano backend.
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
Cause
update of XCode (g++ compiler) without accepting terms and conditions, this was pointed out above thanks Emiel
Resolution:
type g++ --version in the mac terminal
"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." is output as an error
launch Xcode and accept terms and conditions
return g++ --version in the terminal
Something similar to the following will be returned to show that Xcode has been fully installed and g++ is now available to keras
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Restart you machine… I am sure there are some more complicated steps that someone smarter than me can add here to make this faster
Run the model.fit function of the keras application which should run faster now … win!
Run the following command in centos
yum install gcc-c++
then it will work
I had this issue also on MAC. I also couldn't install XCode through the app store so instead installed through the terminal using:
xcode-select --install
I have MAC OS X 10.8 and i have updated my python to version 2.7.3 using Python's official binary from their website.
I am trying to run a python script which needs to be executed using 32 bit python.
How can i force to run 32-bit python instead of 64-bit?
Command file /usr/bin/python gives me following output.
Alis-Mac:~ ali$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures
/usr/bin/python (for architecture i386): Mach-O executable i386
/usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
I have also tried the following.
export VERSIONER_PYTHON_PREFER_32_BIT=yes
But this has not even helped because now, i have custom python i guess.
My script has wxpython code in it and i am building app for OSX using platypus so, i have to force my script to run with 32-bit python. Please help.
for now install virtualbox and develop your app in a 32Bit Ubuntu
you can also install pycharm which can allow you to debug through vagrant