How to install pyperclip to Anaconda? - python

I want to install pyperclip from GitHub using pip install but unfortunately it's only installed to pip and not Anaconda. I'm using PyCharm and my interpreter is Anaconda. (Linux)
I want Anaconda to install the package 'pyperclip' as well so I can use it in PyCharm. I've try Googling but can't find any result.

From Anaconda's website, run the following in Terminal/cmd:
conda install -c conda-forge pyperclip

You need to make sure the following command uses the pip in your CONDA_FOLDER/Scripts/pip or CONDA_FOLDER/envs/ENVIRONMENT_NAME/Scripts/pip:
pip install git+https://github.com/asweigart/pyperclip.git
or if a specific branch (instead of the default one is needed) then use:
pip install git+https://github.com/asweigart/pyperclip.git#BRANCHNAME
However you need to make sure your PyCharm actually uses the environment in which you install the package! Otherwise there is no sense in installing it in the wrong one.

I am not sure because I am not running linux and I never tried it but according to the official website
run anaconda prompt
and then type: conda install -c auto pyperclip=1.3
for more info: https://anaconda.org/auto/pyperclip

To install pyperclip from conda run following command.
conda install -c bryanwweber pyperclip

I was having a hard time installing pyperclip on Anaconda Jupyter notebook. I installed pip and also upgraded it to the latest version. I followed your answers but didn't have luck.
If you're a Windows user, here's how I resolved:
1) Open Anaconda terminal (it's your Windows terminal inside Anaconda)
2)It will open showing the C drive and your username like: C:\Users\joe.jacob
3)C:\Users\joe.jacob\ dir (this will show you where you have Jupyter Notebook. Mine was at .jupyter, so I navigated to it using: cd .jupyter
C:\Users\joe.jacob\cd .jupyter
4)Now install pyperclip at your jupyter notebook like this:
C:\Users\joe.jacob\.jupyter>pip install pyperclip
5) It installs pyperclip package. Installing other pip packages is similar.
I hope this helps.

search for anaconda prompt on your computer and type one of the following
conda install -c conda-forge pyperclip
conda install -c "conda-forge/label/gcc7" pyperclip
conda install -c "conda-forge/label/cf201901" pyperclip
conda install -c "conda-forge/label/cf202003" pyperclip
then click enter and wait for it to download you can repeat it again to confirm whether its installed

Related

Can't install Jupyter Notebook using Windows PowerShell because pip won't upgrade to version 20.1

I'm following this video to install Jupyter Notebook using Windows PowerShell. I entered the scripts folder and type .\pip install jupyter, and then it suggested uploading pip to version 20.1 first. Well, I typed python -m pip install --upgrade pip as suggested, but nothing happened. If I tried to install Jupyter Notebook again, it would just start a circle once again.
Things I have tried but don't work:
.\pip3 install jupyter as some other thread online says
doing all these in the Python folder (one level up)
python -m pip install -U pip, as suggested by the official webpage of installing pip
add Path to Windows as instructed by this blog
Why does this happen? Isn't what I get when installing Python 3.8 the lastest version of pip? How can I actually upload it to version 20.1 now?
BTW, this is what my Scripts directory looks like now:
After you change the Path variable and before you start python -m pip install -U pip you have to start a new shell.
It's because the Path you setup is not taken dynamicaly.

Can't install installed python packages

I am using Jupyter Notebook to install packages with the command: !pip install.
I just used this command to install the Options package, but it's still not showing up. I checked the default python Environment as well as the conda environment.
list of Python environments
To install packages into jupyter notebook you have to use conda instead of pip. Just find the conda install instruction for the package you are trying to install.
For example, the command to install numpy on conda is:
conda install -c anaconda numpy
instead of the regular pip version which would've been:
pip install numpy
You can search for yours by googling: conda install <package-name-you-want-to-install>.

installing python 2.7 package with anaconda

I am trying to figure out how to install packages for the first time. I have downloaded Python 2.7 with the Anaconda distribution. When I go to terminal and I type:
pip install pandas-datareader
I see a message that the package was installed successfully. However, when I enter:
import pandas-datareader as pdr
into Spyder, I get the error:
No module named pandas-datareader
I think this might be because I am not installing the package in the right directory. I also tried:
conda install -c anaconda pandas-datareader
and got the same result. I know there are many posts about installing packages, but I am looking for a super basic beginner explanation for how to troubleshoot this. What directory should I save packages in? How do I navigate to that directory? How do I use terminal to download the package into that directory, etc.
Conda installs any package to a conda environment and pip installs python packages to any environment. Your best bet is to create an environment and conda install to that. For example,
conda create -n py35
activate py35
conda install package_name
Typing these into the command line will set up your environment, activate it, and install whatever package you want.
After following your link, I got it to work by entering
!pip install pandas-datareader
in the Spyder Ipython console!

Can't install wordcloud in python (Anaconda)

I am trying to install wordcloud in my python program. I am doing the following steps. Please tell me where i am doing wrong-
I downloaded the wordcloud package from here https://github.com/amueller/word_cloud
Copy and paste it in the Anaconda3 folder.
Open Anaconda command prompt and give the following command "pip install wordcloud".
The following error is showing -
Please let me know what to do.
You can simply use conda package manager to install wordcloud, just run:
conda install -c https://conda.anaconda.org/conda-forge wordcloud
There is a new version available now but this one worked for me
With Anaconda python 3.6
download from this link.
wordcloud 1.3.2‑cp36‑cp36m‑win_amd64.whl
Then don't extract the file, copy and paste the dir in cmd.
Use this command pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
Open JupyterLab from Anaconda dashboard, in terminal 1, run:
conda install -c conda-forge wordcloud
Source: link
It is trying to build Word Cloud using Visual Studio. If you don't have it you can get a subset called "Microsoft Build Tools 2015" here: https://www.microsoft.com/en-us/download/details.aspx?id=48159
Even having a full version of Visual Studio 2015 and my path set up properly I still had trouble installing using pip. I also had no luck with the conda installer. The following worked for me:
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud and download the wheel for the version of Word Cloud you need.
From the command prompt install using pip. For example, pip install wordcloud-1.2.1-cp27-cp27m-win_amd64.whl
Using Anaconda Python 3.6 version For Windows you can do it as:
Installation of wordcloud package
download wordcloud‑1.3.2‑cp36‑cp36m‑win_amd64.whl from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
Copy the file to your current working directory
Open command prompt
python -m pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl
I have python 3.6.3 installed on my windows system. I installed wordcloud package in python but faced the "wordcloud No Module Found" error on Anaconda Jupyter Notebook.
I tried most of the solutions posted here but nothing worked for me.
Finally I installed wordcloud package in the Scripts directory under Anacond3 directory in the command prompt using:
pip install wordcloud
This worked and I am able to import wordcloud on Jupyter now.
I've got the similar error but related to certification, if the error is:
Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify
failed\')])",),))',),)
This other SO question helped me. It basically said to do:
conda config --set ssl_verify false
After a long try:
1) Download the latest version of WordCloud from this link.
2) Copy it into the Script directory under Anaconda3.
3) Open the command prompt and do pip install wordcloud. (If a win[5] authorization error occurs, try doing pip from the admin command prompt or sudo pip install wordcloud.)
You should have a virtual environment for each project or group of projects that use a particular set of packages. I use Anaconda. Jupyter should be installed in each of your virtual environments. Let's assume you've already created the environment foo. Then:
conda activate foo
conda install jupyter
conda install -c conda-forge wordcloud
Now when you do the import it should work. My import:
from wordcloud import WordCloud, STOPWORDS
I'm working through How to Generate a Word Cloud of Any Shape in Python
Installing wordcloud using Anaconda
Latest version of wordcloud : 1.8.1
Python version supporting wordcloud=1.8.1 : 2.7, 3.4, 3.5, 3.6 and 3.7
Installation of wordcloud using Anaconda, you can install from the conda-forge channel:
conda install -c conda-forge wordcloud
Wordcloud installation problem :
Note: If you are facing issues installing wordcloud on Windows10. The follow the below procedure.
Go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
Click on the matching whl file to download.
Naming: wordcloud-[version]-cp [python-version]-cp [python-version]-win [32bit-or-64bit].whl
Then below command in command prompt
pip install <location_of_wordcloud_whl_file>
Example:
pip install "C:\Users\Testuser\Desktop\wordcloud-1.6.0-cp38-cp38-win32.whl"

How to uninstall python jupyter correctly?

I have jupyter installed with python3.5 on my Mac OSX, but I want the python2.7 version. So, I basically need to uninstall the 3.5 version, and reinstall the 2.7 version.
But for some reason I can't uninstall the 3.5 version. I tried sudo python3 -m pip uninstall jupyter, and you can see the results below:
✔ ~/current/directory
20:08 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
✔ ~/current/directory
20:08 $ sudo python3 -m pip uninstall jupyter
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot uninstall requirement jupyter, not installed
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
✘-1 ~/current/directory
20:09 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
...as you can see above, the which jupyter command still returns a valid path, AND not only that. I'm still able to launch jupyter notebook from the command line, and it opens a notebook.
How do I correctly get rid of my existing version of jupyter ? OR, if someone knows how to ADD a python2 kernel to my existing jupyter, that would be fine too. Is that possible?
All I can think of is to manually kill the files and subfolders inside of /Library/Frameworks/Python.framework/Versions/3.5/bin/, but this seems unnecessarily brutal?
The answer over here solved my problem: https://stackoverflow.com/a/42277762/8057434
I'll just summarize what to do.
Run
conda uninstall notebook nbconvert nbformat ipykernel ipywidgets qtconsole traitlets tornado jupyter_* ipython_genutils jinja2 -y
in your terminal.
You can use pip uninstall instead of conda uninstall if you aren't using anaconda.
From your home folder, delete ~/AnacondaProjects. After that remove the export of Anaconda environment variable from your bash profile ~/.bashrc .
Use pip3 instead of pip
pip3 uninstall jupyter
You can install for both python 2 and python 3 on the same computer as long as you use the correct pip version
I have jupyter installed with python3.5 on my Mac OSX, but I want the python2.7 version.
Anaconda is a great way to install python software that you need for specific projects.
Download from https://www.continuum.io/downloads#macos
as said, bash Anaconda2-4.3.1-MacOSX-x86_64.sh (the 2.7 version in your case)
go to the installed directory and type source bin/activate
This creates a command-line environment which has just the right level of libraries etc. Inside, you can install further data with f.ex. conda install numpy. To fix a version, use conda install numpy=1.10.
You should uninstall the jupyter-core, jupyter-console, jupyter-client seperately. After remove them all, these is no package found named jupyter.

Categories