I am trying to install K-modes package in Anaconda.
I cannot find it in Anaconda anywhere.
How do I download and get it to work through an Anaconda distribution?
I am on Mac and have just managed to install kmodes using pip and open in jupyter notebooks in Anaconda. If you are on Windows this might work differently, but you can try it.
First of all I opened the general terminal and I entered
conda info --envs
This shows you what virtual envs have been created in anaconda. It should show you one that says base/ at the start. Simply write source activate and then copy and past the base pathway, and press enter. This will open your anaconda environment.
Then you can do pip install kmodes and enter, and this will install kmodes into your anaconda environment.
I hope this works for you!
Related
The first time I have installed Python on my machine, it was Spyder with Anaconda.
But, with this version, I wasn't able to install pyodbc.
So, I have install Visual Studio Code and everything works fine
But today, I have tried to update some libraries (like certify or scipy) but each time I use pip install, I update my Anaconda folder and not my WindowsApps folder.
So, when I use PIP, how to update the Windows folder and not Anaconda. And also how to remove Anaconda from my computer. In my Windows Settings, I have no app related to Anaconda (weird)
Check your path, and which pip executable is being executed.
If you run it with the full path to your install in WindowsApps, then it should detect and update that version.
You can check which pip you are using with the command of pip --version.
Press win to open the start menu and search uninstall-a to find the Uninstall-Anaconda3.exe or open the control-panel to uninstall it. Like the official docs recommended.
I am receiving the following download error when I attempt to install Jupyter Notebook on Windows:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\*redacted*\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\jedi\\third_party\\django-stubs\\django-stubs\\contrib\\contenttypes\\management\\commands\\remove_stale_contenttypes.pyi'
I located the commands folder and the file remove_stale_contenttypes.pyi was not present. I did a file search for my CPU and the file was not found in another location.
I have never used python, pip, or jupyter before. I am attempting to install them in preparation for a class.
Make sure the maximum file path length limitation is turned off on your windows machine.
In the Registry Editor, use the left sidebar to navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
On the right, find a value named LongPathsEnabled and double-click it. If you don’t see the value listed, you’ll need to create it by right-clicking the FileSystem key, choosing New > DWORD (32-bit) Value, and then naming the new value LongPathsEnabled.
In the value’s properties window, change the value from 0 to 1 in the “Value data” box, and then click OK.
Here is a link to an article describing how to do this: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/
Try uninstalling virtualenv or pipenv (whichever you are using) and then reinstalling. If this doesn't work try installing conda. There are two versions of it:
Anaconda
Miniconda
I would recommend going with miniconda as it is a lightweight installation but does not have a GUI. Here is the link to install it. Afterwards to create a virtual environment do this:
Go to the conda terminal or cmd and type in conda create --name myenv(and change the name of the env to whatever you like). This should create your environment.
Afterwards to activate it, type in conda activate name (Name is again what you put up there) Thats it. You have now created a conda env. So afterwards, whenever you want to access this enviornment again, use the activate command.
As for installing jupyter notebook, first activate your env and the run this:
conda install -c conda-forge notebook
This should install jupyter notebook in that environment. To access that jupyter notebook again, always activate the enviornment and then type in jupyter notebook. If this seems a bit too much for you, you should actually have a program named jupyter notebook(env name) in your computer after you successfully installed jupyter. Just click on that and it will handle everything for you.
Please let me know if you have trouble doing this.
The easiest way to setup Jupyter Notebook is using pip if you do not require conda. Since you are new to python, first create a new virtual environment using virtualenv.
Installing pip (Ignore if already installed):
Download get-pip.py for Windows and run python get-pip.py
Installing virtualenv: pip install virtualenv
Creating a new virtual environment: virtualenv your_env_name
Activate Virtualenv: your_env_name\Scripts\activate
Installing Jupyter Notebooks: pip install notebook
You can launch the notebook server using: jupyter notebook
I'm trying to update Spyder to version 4.0.0b2 but I'm getting an error. I don't have a lot of experience with cmd or anaconda prompt, so I don't understand the problem. Any ideas?
I'm not on MS Windows but I see several things in your screenshot
You are on base environment
You already have spyder 3.3.3 and that means that you have to use conda update spyder or uninstall it and then install it with your command conda install -c spyder-ide spyder=4.0.0b2
The same with all remaining packages mentioned there (preferably one by one since some may disappear like the kernel one when you uninstall spyder 3.3.3)
If you see that Anaconda cannot find the package in your current channels, try via proposed channels on Anaconda Cloud like conda search --override-channels --channel URL/PACKAGE
Hope it helps (:
I cannot install 64-bit Anaconda 3 on Windows 10. It says the install is complete but when I proceed to install VSCode, it fails. It says to check my internet connection and to look in the log file. But my internet connection is fine and there is no log file. I am running the install with Windows Defender turned off.
When I look at the start menu, none of the components except for Anaconda Prompt, are there. I would like to have Spyder and Jupyter, for example, but they are not there.
If I install the 32-bit version, it works fine. But I need the 64-bit version
Similar issue here. For easy VS code installation with 64-bit anaconda version, you can follow this way:
Install ananconda navigator typing this on shell:
conda install -c anaconda anaconda-navigator
Open anaconda navigator:
anaconda-navigator
It opens a GUI anaconda interface. You can install VS Code from here, only click Install:
It stays Installing dependencies for me all the time, but after reboot, appears installed and works properly.
Hope it helps. It would be interesting to know how to obtain this with conda commands avoiding navigator installation.
I simply close the navigator and open Anaconda Navigator as Run as administrator
and my problem solved.
I just installed PyCharm and Anaconda. I installed PyTorch to Anaconda and i can even use "import torch" in Anaconda. I've created a new Project in PyCharm with the Anaconda Interpreter but i still can't use PyTorch in PyCharm.
I had this problem also. Program that imported torch worked fine at anaconda prompt running in my pytorch env, but when i ran pycharm from the windows shortcut and EVEN set my environment to use pytorch env, it would complain torch could not be imported.
When i ran pycharm from the prompt as shown, it worked.
If you used a bash script and the conda environment to run python codes in your PyCharm IDE.
You also need source activate myenv in your bash script.
Like this:
#!/usr/bin/env bash
source activate myenv
python test.py
source deactivate
I got the same problem and you that how i solved the problem:
1- when you open project choose conda as your project interpreter as shown here
2- in your project go to setting -> project: project name -> Project Interpreter check that you are using Conda Package Manager and your anaconda local settings
I got same problem and solved it:
After you installed anaconda, source activate your own envrionment.
Install pycharm-community and pytorch follow their official instructions.
Start pycharm-community in the same anaconda environment.
Loading your own project, followed instructions as Manuel Lagunas
Finally, you have to install packages of torch in the environment of pycharm: pictures as:
press '+' on the right side to install
you can choose packages of torch by typing 'torch'
Finally solved this in Windows 10 after sinking an entire morning into it.
Create a new Conda environment (via PyCharm or however you fancy)
Navigate to C:\Your\Environment\Path\Scripts in a command terminal
Mine looks like this: C:\ProgramData\Anaconda3\envs\Snek_V2\Scripts
Find what commands you would need for a pip install from the PyTorch website
They'll look something like this:
pip3 install https://download.pytorch.org/whl/cpu/torch-1.0.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
In the command terminal, you want to enter those commands with one difference; you'll need to replace pip3 with pip.exe. As you've navigated to the exact environment you plan to work in, this will be the pip relevant to you.
e.g. pip.exe install torchvision
Open PyCharm and open the project that's working in the Conda environment we just set up.
If you open up a Python Console, you should now be able to enter import torch and not have any errors pop up in response.