OS X 11.4 Xcode 7.3 Swift REPL Error - xcode

I'm new to Swift and I using Swift REPL to do some code.
And hers's the error.
But at the end of this long error log it comes :"Welcome to Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29). Type :help for assistance."
Is there something wrong and how can I fix this?
Thanks!

tl;dr - Check your PATH environment variable.
I had this same issue and was able to get through it. In my case I had MAMP PRO installed and was using a modified PATH for it. That turned out to be problematic for using the swift REPL.
I use Zsh as my default terminal shell, so in my ~/.zshrc file (~/.bashrc is the equivalent for Bash) I had changed
export PATH="/Applications/MAMP/bin/php/php5.5.3/bin:$PATH"
export PATH="/Applications/MAMP/Library/bin:$PATH"
to
export PATH="$PATH:/Applications/MAMP/bin/php/php5.5.3/bin"
export PATH="$PATH:/Applications/MAMP/Library/bin"
and restarted my terminal session. The swift REPL was now starting up properly again.
I had not checked thoroughly if this adjustment adversely affected my MAMP PRO setup but a quick check suggested that this change was fine.

That happened to me too. Not really know about ur problem but I solved mine by reinstalling the newest version of Xcode. That happened mostly because you did not update the new version of Mac which is required to run the newest Xcode which caused the terminal repl problem because the Xcode can not be run at the first place.

Related

Problem trying to run Flutter on any IDE on macOS

I recently got the idea to try out flutter and found particularly difficult to implement it on my macOS (intel).
I have well updated my path, I could run flutter doctor nicely.
Flutter doctor -v
The problem resides in setting up the IDE, I tried both VScode and IntelliJ IDEA.
And I got the same result both time.
env: bash issue
When trying to create a project, there is no issue recognizing the path as shown on this picture
, the problem is brought up right after, when I click Create. It says that env: bash no such file or directory. What I don't understand is that I have a Zsh Shell, and I changed the setting on my IDE to use the /bin/zsh
But I still get a bash (my old SHELL) problem ?
I get the same problem on VScode.
If anyone has any help or information to provide, I would gladly accept it !
Thanks a lot.

Build phase in Xcode 13.3 started failing

I have a build phase that calls some python scripts.
This has been working fine for well over 2 years, but after recently updating to Xcode 13.3 it now fails.
the error I started receiving is:
/Users/me/Library/Developer/Xcode/DerivedData/MyApp-fsowouspdsdjjzfmlfafizjbkcae/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-9002D8C42166BC850081D43D.sh: line 6: python: command not found
Command PhaseScriptExecution failed with a nonzero exit code
At a glance, it looks like xcode is attempting to run the script on the simulator instead of running in the local project directory.
python --version:
Python 3.8.3
I am wondering if there is some new configuration that I am unaware of for new xcode versions?
EDIT:
when i run the the lines in the script in my terminal, they run just fine.
You have installed Python 3 somehow (brew, perhaps), and it is in your PATH. That is why, when you say python, it is found.
But that same Python is not in Xcode's PATH! And it never has been. You've never noticed this, and you've never needed to notice it, because Xcode has always used the system Python, which was located in /SystemLibraryFrameworks. You and Xcode were probably using different Python versions (the system version stopped at 2.7), but this didn't matter.
But now (Monterey 12.3), it isn't. There is now no Python in Xcode's PATH. Thus, when your script says python plain and simple, it isn't found. You can fix this by using a complete path in your scripts that specifies where your Python is. You can find this out by saying which python.
So, Xcode seems to bundles its' own versions of python and python 3. It does not use the system version, so changes to Monteray 12.3 would not affect this.
Since that is the case, the correct solution is changing python to python3 since it looks like an Xcode update dropped python2.7 to parallel the OS dropping it later. I had to also update my python file to ensure compatibility.

terminal in pycharm prints mess data

Using PyCharm CE 2017 on MacOS Sierra 10.12.6.
when i'm trying to use terminal, after making some things and comfirming by 'enter' i have a lot of redundant data in output. For example:
133;C;1337;RemoteHost=apuzikov#77.88.0.89-1337;CurrentDir=/Users/apuzikov/Documents/projects/personal/python133;D;127133;A77:python apuzikov$ 133;Becho hi
hi
133;C;1337;RemoteHost=apuzikov#77.88.0.89-1337;CurrentDir=/Users/apuzikov/Documents/projects/personal/python133;D;127133;A77:python apuzikov$ 133;apuzikov$ 133;B
When I'm using itellij idea - everything fine. does anybody solved out how to remove this mess?
I solved this issue by following these step
Preferences --> plugins
Uncheck Python Terminal
Restart PyCharm

MacVim on OSX / Yosemite: no editor windows visible at all

Installed MacVim on my Yosemite 10.10.2 Macbook Pro today from http://www.macupdate.com/app/mac/25988/macvim
The problem is that no editor window(s) are visible. If I open a file using the menu, there's simply no effect: no editor window appears. It's not hidden behind other windows, it's not listed in the Windows menu, it's just entirely undisplayed.
Strangely, the file will appear in the MRU list, though. So this renders the entire editor completely useless. Should I just build gvim myself? Is this app actually being maintained by anyone?
I'd read some answers which suggest running:
brew install macvim
... does the trick.
You might want to try that first.
What worked for me...
However, this didn't work for me because although it updated my macvim, the one being linked to in the /Applications folder was not the version being updated by brew.
So, here are the steps I had to take.
Quit MacVim if open.
Delete the MacVim file in /Applications.
In the terminal, run:
brew install macvim --override-system-vim
Run (this will add the link to your Applications file):
brew linkapps macvim
I can't be sure every step above is required, or that the --override-system-vim flag is required, but I can tell you that doing the above steps worked for me.
Hope this helps.
It looks like MacVim development has been moved to a new repository (and maybe a different group of developers?):
https://github.com/macvim-dev/macvim
This repo has had changes applied to fix MacVim's graphical problems under Yosemite. (This is the same location that brew's macvim formula currently pulls its source from, which is why MacVim works on Yosemite when installed via brew.)
They also have a set of precompiled binary releases:
https://github.com/macvim-dev/macvim/releases
The latest ("snapshot 76") has worked fine for me in Yosemite so far. You just need to download the .tbz archive, double-click it to unpack to a folder, then drag the MacVim.app icon to Applications -- much easier and less invasive than installing a whole package management system and build environment! :)
Note: I had to execute a command given in another StackOverflow answer to correct a rendering glitch seen in full screen mode for snapshot 76:
$ defaults write org.vim.MacVim MMNativeFullScreen 0
I got the same problem today.
The solution:
mv ~/.vimrc ~/.vimrc_bak
It looks like there is something wrong with my .vimrc file.
I was having the same issue, and one of the answers in here helped me, but not for the reason explained so I thought this might be useful for others.
Some plugins might depend on the version of vim, and may work in version 7 but not in version 8, when you install MacVim this could be version 8, and the terminal vim version might be 7, both will use the same .vim folder and .vimrc to load the plugins and configuration, when you open the vim from terminal it might still work because the plugins were depending on vim version 7, but when you try to execute MacVim it will try to load the plugins using version 8 and then it will crash, the reason some of the answers worked it's because they are replacing the system vim, therefore MacVim and vim will be in the same major version, if you have upgraded from the previous version the best you can do it's to clear up the plugins folder and then load MacVim or vim and check that everything is working, then start applying the plugins one by one checking that they are not breaking vim. At least with this method I found that one of the plugins was not working as expected and removing it solved the "MacVim" issue.
In summary:
- move your .vim as .vim_bak
- move your .vimrc as .vimrc_bak (suggested by #hai feng kao)
And test if this solves the issue, if that's the case then a plugin is breaking your installation and you will need to activate some and figure out which is the one that causes the issue.
Hope this helps to others, I've followed a lot of these recommendations without success until I decided to upgrade vim (terminal) and this started to break as well, that pointed me in the right direction.
Again hope this saves some hours for some.
I had the same symptom with MacVim launching with no window and command-N doesn't start any a new one. brew re-install didn't help.
It turned out there was another instance of macvim installed on my system somehow, in the Downloads folder. I found out by clicking "MacVim" --> "About MacVim" and it was a version from 2014. I found the instance and deleted it.
I created an alias for the newly installed version and copied that into Applications folder so spotlight search can find the new one. That solved my problem.
I had this problem upon updating from MacOS 10.12.5 to 10.12.6.
I uninstalled MacVim by moving it to the trashcan and downloading it again.
I would guess that the new version fixed whatever issue it had with the new operating system.

Issue with uninstalling Xcode 3.2 on Mountain Lion

I just upgraded to Mountain Lion (from Snow Leopard) so as to take advantage of Xcode 4.
Before installing Xcode 4, I would like to remove Xcode 3 (not required, but want to clean up before moving on).
The standard method of removing Xcode 3 is:
$ sudo <Xcode>/Library/uninstall-devtools --mode=all
However, when I issue this command, even from within the /Library folder, the only thing that happens is I get a "command not found" after entering my password.
I can see uninstall-devtools in Finder, so I know it's there. I just can't execute it for some reason. I've tried every possible way of running the uninstall tools.
Assistance is greatly appreciated. Thanks.
If the file really is there, type sudo in the terminal window (with a trailing space), drag and drop the uninstall-devtools file on the window, then append --mode=all. That should clear any chance you have to make a typo or any other mistake.
Similarly to information I found in another SO article, my laptop's old XCode 3.2 didn't even have the uninstall-tools utility.
So it worked fine for me to simply delete the XCode.app folder.

Resources