I met a problem when I try to install rospy through conda. First, I use command "conda activate mujoco_py" to activate a specific environment I usually use. Then I input the command " conda install -c conda-forge ros-rospy ". Then after I finish installing the rospy, I input the command "env |grep ROS", it shows as below:
ROS_VERSION=1
ROS_PYTHON_VERSION=3.8
ROS_PACKAGE_PATH=/home/shine/anaconda3/envs/mujoco_py/share
ROSLISP_PACKAGE_DIRECTORIES=/home/shine/catkin_final/devel/share/common-lisp:/home/shine/catkin_ws/devel/share/common-lisp
ROS_IP=192.168.1.7
ROS_ETC_DIR=/home/shine/anaconda3/envs/mujoco_py/etc/ros
ROS_MASTER_URI=http://192.168.1.7:11311/
ROS_ROOT=/home/shine/anaconda3/envs/mujoco_py/share/ros
ROS_DISTRO=melodic
My Ubuntu system is ubuntu 20 and install ROS noetic. Does anyone know how to deal with the problem of that? I would like to use ros in my specific conda environment and also without conda it can be also run. I try to use the command "conda uninstall ros-rospy" to uninstall it from my conda environment, but I failed.
Oh! I dealt with the problem with the command "conda uninstall ros-rospy" with three times. Sometimes you need to try several times due to the speed of the internet or your personal device situation.
Related
I'm currently starting udemy's Guide to tensoflow course. And it's required to type 'conda env create -f tfdl_env.yml' on the command line after using cd to get to the unziped file 'Tensorflow-Bootcamp-master'.
But after doing so this poped off: 'Solving environment: failed' (I'm on windows btw and have just installed anaconda)
I've been searching for solutions but didn't find anyhting. Is there a solution to this problem?
link to the picture of the command line
Solving environment can sometimes failed in conda, that is why, especially for machine learning libraries (I use it for everything though). Try to install every package using
conda install -c packagename conda-forge
That may take some time, but for me it was usually the solution
Sorry there may be some confusion.
Create environment of the name you want, without any specific packages
Activate environment conda activate env_name
Install all packages using forge
I am trying to open Spyder on root and I get the following error message:
ModuleNotFoundError: No module named 'IPython.core.inputtransformer2'
This error has been shown after trying to install a package with pip (and Spyder crashed).
I have even uninstalled Anaconda completely and reinstalled but the problem persists.
I had created a virtual environment where at least I can launch Spyder from here. But on root I just cant.
Any suggestions?
Had the same problem a while ago. You can upgrade IPython using the following command. Hope it resolves your issue.
conda update IPython -n envname
envname is the name of the environment you are trying to work in. Also, you might want to install sudo in the correct environment too if you haven't done already.
conda install -c odsp-test sudo
check all the requirements from the spyder installation page,
https://docs.spyder-ide.org/installation.html
update or install the requirements that are missing. This should work for you.
When I put the following command in anaconda prompt
conda install -c anaconda gensim
Python stops working and shows the following error message:
How do I deal with this problem?
As per the documentation https://anaconda.org/anaconda/gensim
install it by
conda install -c anaconda gensim
It might take a while to solving the environment
I usually in stall gensim using pip on anaconda prompt using the following command
pip install -U gensim
or simply
pip install gensim
as shown in the anaconda documentation.
My solution is for Windows 10, Anaconda. Where I want to use gensim with Spyder.
Solution: Use Anaconda Navigator, and install package from there: Open Anaconda Navigator -> Environments (base) -> not installed (packages) -> (search for) gensim -> check the gensim option from the drop down list-> Press apply button -> (wait for a while, it will search other dependencies, then press the button one more time to install required package)
Scree shot of Anaconda Navigator
History: On anaconda command prompt, using conda command, I installed gensim. Every thing looks perfect but it was even not imported, "import gensim", in command prompt.
Bonus: Same is true for tensorflow
You need to go through the conda-forge channel. Try running
conda install -c conda-forge gensim
I tried your command on Windows with conda version 4.4.10, and it installed with success.
Try to updating to the latest version, as suggested in the comments.
Also if that doesn't work (it happened to me with other modules), try from the Anaconda prompt: pip install -U gensim.For me it worked for other occasions.
And the last solution is to download the archive version and build it yourself locally.
Tried to
conda install -c conda-forge requests-futures=0.9.7
but failed with
conda is not recognized as an internal or external command,
C:\Users\user_name\Anaconda3\Scripts has been set for Path in environment variables under both user and System variables.
I installed Python 3.5 as well and it is on Path, I am using Win10 X64.
How to fix the issue?
When you install anaconda on windows now, it doesn't automatically add Python or Conda to your path.
If you don’t know where your conda and/or python is, you type the following commands into your anaconda prompt
Next, you can add Python and Conda to your path by using the setx command in your command prompt.
Next close that command prompt and open a new one. Congrats you can now use conda and python
Source: https://medium.com/#GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444
There is a similar question asked here before, check this may be it will help you.
To make sure that conda package is installed correctly, check if conda package files , i.e conda conda-env conda-env-script conda-script conda-server conda-server-script etc are present in Anaconda3\Scripts folder.
I had a similar problem when using cmd.
From your Command prompt 'C:\Users\zkdur\anaconda3\Scripts
Now try
conda init --help
conda init --verbose after that restart your command prompt and conda will be working.
After installing Anaconda on windows 10, you can use Anaconda prompt from start menu to activate a conda enabled terminal window.
Just Check Both the options while installing Anaconda.
(https://i.stack.imgur.com/WogNs.jpg)
My conda is corrupted after I run command "pip install conda". Is there any way to recover it ? Thanks
Here's the error I see when running conda command
ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer. You can download the miniconda installer from
https://conda.io/miniconda.html.
Simply, follow the instructions given in the error:
Download miniconda, then run the script file by typing following command: bash <file_name.sh> e.g.
bash Miniconda3-latest-Linux-x86_64.sh.
Now reopen the terminal for the changes to take effect.
If conda is already installed on your system, you can reinstall it with the -f force option, for example,
bash Miniconda3-latest-Linux-x86_64.sh -f
To test your installation, enter the command conda --version. If installed correctly, you will see the version of conda installed.
miniconda: https://conda.io/en/latest/miniconda.html
conda troubleshooting: https://conda.io/docs/troubleshooting.html
If you are facing this problem in Virtual Machine (VM) then you have to activate the main environment by running below line of code:
source /anaconda_installation_folder_path/bin/activate
Once you are in your main environment you can work with conda.
TL;DR: nothing is corrupted, the message you're seeing is a hardcoded stub and could be fixed.
conda package manager actually can be used with regular python installation.
Update: I've been tinkering with the described method and found that you should use conda install --dry-run ... to see changes that are going to happen. Some conda packages depend on other python version, which would overwrite the installed one. There's might be a solution for this with changing conda channels or using virtualenv. I also found that --dry-run doesn't work when using local package archives.
I'll show you how to run cudatoolkit 9.1 without any Anaconda and python-3.6-amd64. I'm using cuda 9.1 from here.
Since conda is artificially tethered with Anaconda, you have to untie them.
I recommend you to backup up python installation directory you'll be working with (or use virtualenv).
Install menuinst dependency.
At the moment, it's broken from PyPi, so get if from
github. Build it and install python setup.py install
This package is problematic also in Anaconda distribution. It triggers series of requests for admin rights every time, which should be suppressed with conda ... --no-shortcuts option.
pip install pypiwin32, dependency of (1)
pip install conda, requires (1)
Move to python installation directory. ./Scripts/conda.exe should exist.
Move to ./Lib/site-packages/conda
Search directory recursively for pip_warning substring in following TEXT file types: .py, .json, .txt
Replace matching substrings pip_warning with main
Don't forget to abide the syntax of file types you'd be editing.
Now open the ./Scripts/conda.exe executable in any hex-editor and
find pip_warning, carefully overwrite it with main and wipe the
rest with spaces until bytes import main
Check for file size not have changed.
Remove any __pycache__ dirs if found in ./Lib/site-packages/conda
If you only need working conda without cuda, you're done here.
Run conda install mkl, pip install llvmlite numpy
Download packages cudatoolkit-9.1-0.tar.bz2
and numba-0.36.2.tar.bz2
and run
conda install cudatoolkit-9.1-0.tar.bz2
conda install numba-0.36.2-***.tar.bz2
Wait a little while unpacking finished.
Now try these examples, they should work and your gpu monitor show some activity. conda ... commands also do work.
With Linux, I guess instructions are the same, just would be .sh or ELF in place of .exe.
In my case, what worked was:
pip uninstall conda
and then installing miniconda
Download miniconda, then run the script file by typing following command: bash <file_name.sh> e.g. bash Miniconda3-latest-Linux-x86_64.sh -u
'-u' : update tag, used if the original conda bash paths get lost due to certain modifications in the .bashrc file