I wanted to use awscli with Cygwin, window7.
So I typed pip install awscli and succeeded the install.
But when I type aws, I got an message
C:\Users\k\Anaconda2\python.exe: can't open file '/cygdrive/c/Users/k/Anaconda2/Scripts/aws': [Errno 2] No such file or directory
I don't know what is cygdrive,first of the path.
So I tried cygstart/C/Users/k/Anaconda2/Scripts/aws
but it also didn't activate with error msg Unable to start 'C\Users\k\Anaconda2\Scripts\aws': The specified file was not found.
I don't know how should i do
Related
I've installed Google Cloud SDK on my laptop. The gcloud command is available/accessible via git bash from any subdirectory. However, the gcloud init command returns the following error:
/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/gcloud:
line 191: /c/Users/me/AppData/Local/Microsoft/WindowsApps/python:
Permission denied /c/Program Files (x86)/Google/Cloud
SDK/google-cloud-sdk/bin/gcloud: line 191:
/c/Users/me/AppData/Local/Microsoft/WindowsApps/python: Permission
denied
Any idea what the issue might be or how to debug it?
Hmm, so your shell is bash? And you're on Windows apparently, so try using a cmd shell (at the start menu, hunt for cmd and run it). See if you can run python from there. If that works, then running gcloudshould probably work too.
If that doesn't work, then you've probably got python installed improperly somehow. If you didn't install it, maybe something else installed it for you as part of a package. You should probably uninstall and reinstall it (https://www.python.org/downloads/). Also check if gcloud requires any specific version of python first.
Include location of python in your path.
If it looks for some other name of python e.g. python3, include soft link to python
prompt> ln -s python python3
I am installing aws cli on Mac. Previously I installed anaconda to control my python versions. So I installed python using conda. Now I want to install aws cli.
By using pip:
pip3 install awscli --upgrade --user
The installation was successful. However, when I run
aws --version
It told me that aws command was not found.
I again tried to add it to the command line path. But I could not find where it was installed.
When I run
which python
It gave me
/anaconda/bin/python
People say this might not be the real folder and it is true I could not find aws cli under it either.
I then run
ls -al /anaconda/bin/python
It gives
lrwxr-xr-x 1 mac staff 9 Aug 15 20:14 /anaconda/bin/python -> python3.6
I dont understand the path at all.
How could I find where my aws cli installed?
I ran into the same issue and eventually found the awscli command in ~/.local/bin. Just add /Users/<username>/.local/bin to your $PATH.
You can do this by editing ~/.bash_profile, which probably already has these lines in it:
# added by Anaconda3 4.4.0 installer
export PATH="/Users/<username>/anaconda/bin:$PATH"
You could make another copy of this line but replace the anaconda path with the new one, but I just updated the existing path since the two are related:
# added by Anaconda3 4.4.0 installer
export PATH="/Users/<username>/.local/bin:/Users/<username>/anaconda/bin:$PATH"
I solved the problem by using conda to install awscli.
conda install -c conda-forge awscli
worked so far. It seems that pip install does not work for conda installed python... Is this conclusion true?
If it's installing and then saying "command not found" it probably just means that the executable it has installed is not referenced in the operating systems PATH environment variable.
Here is how to add the downloaded executable to PATH: https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html#awscli-install-osx-path
Here is the AWS docs to troubleshoot the issue: https://docs.aws.amazon.com/cli/latest/userguide/troubleshooting.html
I encountered an identical situation.
I solved this by adding the location of the awscli command to the file...
/etc/paths
The location to my awscli command was where others had found it...
~/.local/bin
From my home directory in Mac OS X Terminal, I entered a quick nano command to edit the /etc/paths file...
sudo nano /etc/paths
#For those who don't know...
#sudo is to get admin access
#nano is quick and dirty file editor.
# /etc/paths is the file you want to edit.
I entered my password, then I just added the awscli command location at the end of the file...
/Users/UpAndAtThem/.local/bin
Yours might be be...
/Users/your_username_here/.local/bin
Still in Nano editor to exit and save: Hit control+X > Hit Y > Hit Enter.
Here's a quick video...
https://youtu.be/htb_HTwtgmk
Good luck!
I'm trying to install data set on Ubuntu and when I use
pip install dataset
it gives me a long error message, and from what I could debug from it is that permission to the directory is denied. When I try
easy_install dataset
it says error: can't create or remove files in install directory because permission is denied Maybe my account doesn't have write access to this directory?
If you're receiving the error can't create or remove in install directory because permission is denied then you need to run your commands with sudo privileges
Try:
sudo pip install dataset
or
sudo easy_install dataset
I have read posts on here but something doesn't seem to work. I am new to Python dev. I am running windows 7 64bit.
I am trying to install pip which I have downloaded and have easy_install in my c:\python27\scripts directory. When I use powershell and type
"python easy_install pip"
I get the error message:
"can't open file easy_install": [Errno 2] No such file or directory.
This seems odd as I can see the easy_install.exe is in that directory.
I have added c:\python27\scripts to my system PATH but, to be honest, I am not sure if this is right.
Could someone please help?
Thank you.
The selected answer dint fix it
This did:
python -m pip install -U pip
The best way to fix this is to compile easy_install yourself. First download the source code, and then compile it using python.
1 - Go here.
2 - Then extract the file, using 7-zip, or any software that can unzip a tar file. This is a tar.gz file, so after one extraction, it will give you the tar file, and then it will give you the actual directory and files for setup tools
3 - Go into the directory where you stored the contents of the extraction (using command prompt). For example, if you stored the directory on your desktop, you cd Desktop and then you go
cd dir_where_easy_install_is.
4 - Then run this command python setup.py install
That will install easy_install for you.
5 - Go back to your command line again, and then just type in easy_install pip, and that will install pip.
Then go ahead, and test it out, by installing django, just go into your command prompt, and enter this pip install django. After the download and the install, type in pip list, and see if django is in there. If it is, then pip has been successfully installed.
This worked running python from it's main dir against the easy_install.py in the extracted setuptools directory.
Then pip files should be in the Scripts dir.
Don't forget to run your CMD as administrator.
I am trying to run a python tool that will authenticate me to linkedin, in order for me to download my linkedin network so that I might be able to analyze it inside of Gephi. I obtained such a file here:
linkedin-1-oauth.py from github
I cloned that and the two other files he has in the gist. I did this from my terminal by just doing git clone [url here] for all 3 of the files. I put my api and secret keys in the corresponding places.
I did a pip install oauth2 and updated httplib2 as suggested here:
pip install oauth2 and update httplib2
I also did this from the command line, which downloaded and installed the files in the same directory as to where I downloaded the linkedin files from gist, just all in my user folder.
When trying pip install oauth2 and get the following error message:
Downloading/unpacking oauth2
Running setup.py egg_info for package oauth2
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/lib/python2.7/dist-packages (from oauth2)
Installing collected packages: oauth2
Running setup.py install for oauth2
error: could not create '/usr/local/lib/python2.7/dist-packages/oauth2': Permission denied
Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/steven/build/oauth2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e2RkcV-record/install-record.txt:
running install
running build
running build_py
running install_lib
creating /usr/local/lib/python2.7/dist-packages/oauth2
error: could not create '/usr/local/lib/python2.7/dist-packages/oauth2': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/steven/build/oauth2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e2RkcV-record/install-record.txt failed with error code 1
Storing complete log in /home/steven/.pip/pip.log
I then tried easy_install oauth2 and got the following error message:
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-4349.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.7/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://packages.python.org/distribute/easy_install.html
Please make the appropriate changes for your system and try again.
So then I tried doing sudo apt-get install oauth2 and it could not be found
I am running Ubuntu 12.04 LTS I did all my sudo update and upgrades before I did anything else this morning. I am running python 2.7
Thank you
I was able to fix the problem by going here:
python-oauth2
Steps to install python oauth2 library on windows
Download http://python-distribute.org/distribute_setup.py and copy wherever python was installed
Run "python distribute_setup.py"
Download and unzip Oauth2 to a directory. Navigate to this directory.
Run "python setup.py install" to install ouath2
if you have python 2.7.10 or higher here is simpler method.
Use 'pip' to install python modules.
Say in my case on windows following does the trick.
C:\Python27\Scripts\pip install ouath2