-
Notifications
You must be signed in to change notification settings - Fork 178
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
OS X Installation issue #423
Comments
I wonder if this has something to do with using |
Thanks for the reply. I did have the same issue with "sudo port install py-pip", which installs pip-2.7. The command then becomes "sudo pip-2.7 install proselint", and there is no "proselint" executable. Where does your "proselint" command point? I see the files of proselint in the python install directory, but there isn't a "proselint" binary that I can see. Perhaps I'm misunderstanding how this is supposed to work? I'm not familiar with python. Am I supposed to be executing "proselint" command from a special python shell? I'm just trying it from the command line. |
I believe this is using some cool Python feature that your (and my) version of Python/MacOS/whatever doesn't support. I wish it did. If you're lazy and value expediency over correctness, you can do what I did and create a stupid wrapper: #!/usr/bin/env python
import proselint.command_line
proselint.command_line.proselint() |
@MrAndrey Is there a reason why you are installing Python on OS X, which includes one already? What happens if you use the system Python, @jeremiahblatz What OS and Python are you using? |
So I use a different process based on Why are you installing 3.4 rather than 3.5? It shouldn't make a difference, but if you use I think by default we install to Also, just want to make sure; @jeremiahblatz, what happens if you write the same wrapper using
Does that still work? (I'm not saying that these things are going to be fixing your problem, but these are the things I would do to see what is going on with your python executables). @MrAndrey Are you running this from inside a @suchow Is there any reason why the |
Thanks for the replies, everyone. I'll do my best to answer all of the above questions and help troubleshoot this. I'm using Mavericks. When I initially typed "pip install proselint", I got command not found, so I had to install pip. To do that using MacPorts, I typed "sudo port install pip". It gave me package not found. I did a search and found that there's a big list of different versions of pip, all starting with "py-pip". I typed "sudo port install py-pip", and it installed version 2.7. After it installed all the dependencies, "proselint" command gave me a command not found error. I decided to try a higher version of pip, the highest available being 3.4. I followed the same steps, and ended up with same results. So, @michaelpacer to follow your suggestion, I uninstalled proselint (using sudo), then typed "pip-3.4 install proselint" without sudo. Below is output. Permission errors.
I checked, and /usr/local/bin/proselint is not there. Thanks much for troubleshooting this with me. |
So, because you can use If you're using Mavericks, then you shouldn't have any of the El Capitan issues regarding Others might disagree, but I tend to not like using sudo as part of my pip installs (or brew installs for that matter). I don't want to give these packages root access and I don't want to be typing my password constantly, so if I have to use Notably, permission issues can sometimes manifest in the kind of problem that you are having, where you install something but then it doesn't seem to exist because when it is invoked, the thing that does the invoking does not have the correct permissions to execute the process needed to find the relevant command semantics. Did you try Since you have If you don't want to try to troubleshoot that (an understandable position) I'd take a shot at what is suggested here http://kazhack.org/?post/2014/12/12/pip-gem-install-without-sudo and try using ––––––––––– Also, is the reason you're using mac ports vs. brew that you've been using mac ports and are more comfortable with it than homebrew? All of that said, @suchow and I don't want people to have to change their workflows to get proselint to work with them, but rather to change proselint to ensure it works within others' workflows. So, even if you do want to switch (which I really do recommend if you can take the time to do so) could you hold off on doing so until we figure this out in your current workflow? Also, my responses will be intermittent as I'm spending almost all of my time writing my dissertation; writing this counts as one of my breaks 😅. Fortunately it can be relaxing to think through these kinds of things. Happy to help! |
I finally got it to work. Here are the steps that I took: Then I upgraded my MacPorts packages: Then I installed latest python and set it as default: Then I closed and reopened the shell. Then I installed py35-pip. Trying to install "py-pip" still tried to get pip for python 2.7, so I had to be specific. Then, following @michaelpacer's suggestion, I installed proselint without sudo: Now when I type "proselint --demo" into terminal, I get a list of corrections, as expected, and I also got it to work with Sublime Text (which is a bit of an undertaking in itself). Many thanks for your help! |
@suchow I'm running stock Python (2.7.4) on MacOS X (10.10.5). (I know Apple's Python is bad, but, as I alluded to above, I'm a big fan of expediency.) @michaelpacer : I don't have Python 3 installed, so that wrapper fails with the predictable result of Anyway, the fact that people are actually interested caused me to dig a little deeper. My problem was, in fact, the dumbest possible problem: |
I just tried to follow my own instructions on an older machine running Snow Leopard and it didn't work. I'm posting the extra steps here for reference.
Now I have the /Library/Frameworks/Python.framework/Versions/3.5/bin/proselint executable. It wasn't there when I tried it without downloading python or using pip instead of pip3. Odd, but whatever works. Keep up the good work! |
Hello,
I installed proselint on OS X, but I can't seem to be able to execute it.
Steps I performed to install:
sudo port install py-pip34
sudo pip-3.4 install proselint
The files installed successfully into /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/proselint, but when I type "proselint" and enter, I get "-bash: proselint: command not found".
How do I actually run proselint from command line?
Do I need to configure the path to an executable?
Thanks,
Andrey.
The text was updated successfully, but these errors were encountered: