For installing the fancyimpute, i am using the below commands:
conda install ecos
conda install CVXcanon
pip install fancyimpute
On firing the 1st command "conda install ecos", i am getting the below error. Please help me on this resolution.
Preparing transaction: done
Verifying transaction: done
Executing transaction: | DEBUG menuinst_win32:__init__(196): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\Deepak\Anaconda3', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(320): Shortcut cmd is C:\Users\Deepak\Anaconda3\pythonw.exe, args are ['C:\\Users\\Deepak\\Anaconda3\\cwp.py', 'C:\\Users\\Deepak\\Anaconda3', 'C:\\Users\\Deepak\\Anaconda3\\pythonw.exe', 'C:\\Users\\Deepak\\Anaconda3\\Scripts\\spyder-script.py']
/ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\Users\Deepak\Anaconda3\python.exe, args are ['C:\\Users\\Deepak\\Anaconda3\\cwp.py', 'C:\\Users\\Deepak\\Anaconda3', 'C:\\Users\\Deepak\\Anaconda3\\python.exe', 'C:\\Users\\Deepak\\Anaconda3\\Scripts\\spyder-script.py', '--reset']
failed
ERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::automat-0.7.0-py_1'.
CondaError: Cannot link a source that does not exist. C:\Users\Deepak\Anaconda3\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.
Rolling back transaction: done
CondaError: Cannot link a source that does not exist. C:\Users\Deepak\Anaconda3\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Note: Tried the same command after using "conda clean --packages". But still the issue persists.
Regards,
Deepak
According to this GitHub issue about the same problem (transaction also fails on automat), there are a few things that seem to get it working:
Cleaning. You've already tried conda clean --packages, so maybe you can ignore this one, but the thread also suggests conda clean --all. Personally, I think that's a bit blunt. The users who it worked for may have only needed --packages.
Update Conda. Many seem to get around this by updating Conda, conda update -n base conda.
Update Anaconda. Some said it worked to run conda update anaconda.
Freeze installed packages. Some users noticed that it only happens when planned transactions include updating other packages. One can prevent other packages from updating by using conda install --freeze-installed ecos.
Issue with latest Automat. One user reports the issue is specific to the recent 0.7.0 version of Automat. They report having a successful transaction by explicitly requesting the previous Automat version, e.g., conda install ecos automat=0.6.*
Recommendation
I would try (2) first.
Something I find strange in all this is that everyone reporting this is on Windows, but Conda attempts to install the noarch version (as indicated by the py_1 in the tarball). Nothing particularly wrong with that, but on OSX, Conda specifically tries to install the osx-64 version. Hence, I would attempt to explicitly install the win-64 version of 0.7.0 and see if that works. That is,
conda install conda-forge/win-64::automat
If that doesn't work, I suppose I would try (4) or (5) next.
Related
I am trying to install pytorch using conda.
I believe there are known problems with pytorch and python 3.9, so I set up a virtual environment with python 3.8.11
I then activate this virtual environment and try to install pytorch using conda with
conda install pytorch torchvision -c pytorch
Everything seems to be going fine until the end. Here is the full stack trace:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package 'conda-forge::cudatoolkit-11.1.1-heb2d755_7'.
Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::cudatoolkit-11.1.1-heb2d755_7
location of failed script: C:\Users\Xavier Gonzalez\anaconda3\envs\venv\Scripts\.cudatoolkit-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:
stderr: Access is denied.
return code: 1
()
I have looked over the web but have not found anything I could use. Does anyone have an idea of the right direction, or a conceptual understanding of what is going wrong?
Good news! There is an extremely simple fix
The official pytorch website (https://pytorch.org/) indicates that the correct command is
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
So I have been encountering some problems with setting up a proper Anaconda Interpreter with Pycharm. Per the documentation on the anaconda website, and the Pycharm website they are suggesting that I go to the Add Interpreter settings near the bottom right of the Pycharm GUI, once I click on the current interpreter.
For example,Pycharm is saying my current interpreter is Python 3.9 . Then click on the Conda Environment which I did, however, when I have done so I am getting an Error Message like:
CondaError: Unable to create prefix directory '/opt/anaconda/envs/pythonProject9'.
Here is the command output as well:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/anaconda/envs/pythonProject9
added / updated specs:
- python=3.9
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
ca-certificates pkgs/main/linux-64::ca-certificates-2021.4.13-h06a4308_1
certifi pkgs/main/linux-64::certifi-2020.12.5-py39h06a4308_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
pip pkgs/main/linux-64::pip-21.0.1-py39h06a4308_0
python pkgs/main/linux-64::python-3.9.4-hdb3f193_0
readline pkgs/main/linux-64::readline-8.1-h27cfd23_0
setuptools pkgs/main/linux-64::setuptools-52.0.0-py39h06a4308_0
sqlite pkgs/main/linux-64::sqlite-3.35.4-hdfb4753_0
tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0
tzdata pkgs/main/noarch::tzdata-2020f-h52ac0ba_0
wheel pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Preparing transaction: ...working... failed
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.1
Please update conda by running
$ conda update -n base -c defaults conda
Is there something that I am doing wrong? Does anyone need pictures for the PATH? I am not certain if my problem is similar to another individual on here who asked a similar question. My Pycharm IDE is update for what its worth.
The error (which you should have copy-pasted, not screenshotted) says
Unable to create prefix directory /opt/anaconda/envs/pythonProject9
Check you have sufficient permissions.
My best guess is that you've installed Anaconda as root (e.g. using sudo) and are using PyCharm as a regular user (as you should).
If possible, tell PyCharm (or Anaconda) to use a different base path for the environment it's attempting to create, e.g. one under your home directory, or if you're feeling daring, you might chmod /opt/anaconda/envs so you, too, can write there.
I was trying to fix an issue with an old environment earlier today and screwed up conda. I get this:
Solving environment: failed
CondaUpgradeError: This environment has previously been operated on by a conda version that's newer
than the conda currently being used. A newer version of conda is required.
target environment location: /Users/U6020643/anaconda3
current conda version: 4.5.11
minimum conda version: 4.8
The original problem: I recently upgraded to Catalina, and could not build Pandas when installing it to recreate an environment.
Rehoming: Was this post regarding How to Restore Anaconda after Update to MacOS Catalina. I downloaded the script and ran it. It appeared to work. But I had the same problem with Pandas.
./cpr rehome ~/anaconda3
Installing a revision: At some point in my debugging I also ran this, which I have a hunch caused the problem.
conda install --revision 0
Trying to install Conda 4.8: I found this post and attempted the accepted solution.
I added allow_conda_downgrades: true to my ~/.condarc file. conda update conda produced the same CondaUpgradeError and so did conda install conda==4.8.1.
Next I found the package-cache via conda info and attempted to install 4.8 from there. Here is my conda info output.
active environment : None
user config file : /Users/me/.condarc
populated config files : /Users/me/.condarc
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
base environment : /Users/me/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/osx-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /Users/me/anaconda3/pkgs
/Users/me/.conda/pkgs
envs directories : /Users/me/anaconda3/envs
/Users/me/.conda/envs
platform : osx-64
user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Darwin/19.6.0 OSX/10.15.6
UID:GID : 502:20
netrc file : None
offline mode : False
Then I downloaded osx-64/conda-4.8.3-py37_0.tar.bz2 from Anaconda here, put it into /Users/me/anaconda3/pkgs/, and tried:
conda install /Users/me/anaconda3/pkgs/conda-4.8.3-py37_0.tar.bz2
Which resulted in this issue, where I continue to be stuck.
Preparing transaction: done
Verifying transaction: failed
RemoveError: 'conda-package-handling' is a dependency of conda and cannot be removed from
conda's operating environment.
Before marking as duplicate: consider carefully the similar posts. The version numbers here are different, the path and circumstances that resulted in this problem are different, and I have attempted those solutions without luck.
Standalone Conda
I would try downloading a standalone version of Conda that matches the old version of Conda you had (something in v4.8.x), and then try using this to upgrade the Conda package in the base env.
I don't know for sure this will work, but it is pretty simple and will not change anything unless it does work.
Downloads
You can download builds of conda-standalone (PyInstaller-based binaries) from either the Anaconda or Conda Forge channel. Browse to your version (or something close), download the archive (to wherever), unzip, and in the folder standalone_conda you will find a conda.exe file, which is the binary you'll need.
Configuration
Next, you need to set the environment variable CONDA_ROOT_PREFIX to point to your base env's folder, which from your output is /Users/me/anaconda3/. So,
export CONDA_ROOT_PREFIX=/Users/me/anaconda3
Then, to test, check
./conda.exe info
and verify that the values for base environment:, package cache:, and envs directories point to the correct locations, which in a default install would be /Users/me/anaconda3, /Users/me/anaconda3/pkgs, and /Users/me/anaconda3/envs, respectively.
Upgrade
Attempt upgrading the conda package in the base env:
./conda.exe upgrade -n base -c defaults conda
Hopefully, the error you reported before doesn't recur, but I'm actually not sure. Make sure to review any changes if the solve does work.
In the end you can discard the conda.exe and go back to using the one in base.
I just started a new job and I have to set up my geospatial environment in Windows (I was a mac user before). I am having trouble navigating around geopandas bug #830. Based on the comments for the bug, it looks like if I can downgrade pyproj to version 1.9.4 it will fix the issue. BUT, I cannot get 1.9.4 installed for one reason or another. I have tried the following without success:
conda install -c conda-forge pyproj==1.9.4
When I try this, it gets hung up in the "Solving Environment" stage.
I then tried this:
pip install pyproj==1.9.4
but, I get this error:
Collecting pyproj-1.9.4
Could not find a version that satisfies the requirement pyproj-1.9.4 (from
versions: )
No matching distribution found for pyproj-1.9.4
So, I tried downloading the tar file and doing the following:
pip install "C:\Users\myname\Downloads\pyproj-1.9.4.tar"
but got this error:
Could not install packages due to an EnvironmentError: [Errno 2] No such
file or directory: 'C:\Users\myname\Downloads\pyproj-1.9.4.tar'
I have actually done more than this (it has been a long 8 hours), but I am hoping that somebody smarter than I can put me out of my misery :-) I am using conda version 4.5.11 and python 3.5.6.
Thanks in advance for any help.
I tried installing pyzmq by http://ipython.org/ipython-doc/dev/install/install.html as I want to install ipython. But it has dependency on pyzmq which has dependency on gcc. I already have gcc installed but still I am getting the following error while install pyzmq.
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
The script also has following in it:
If you expected pyzmq to link against an installed libzmq, please check to make sure:
* You have a C compiler installed
* A development version of Python is installed (including headers)
* A development version of ZMQ >= 2.1.4 is installed (including headers)
* If ZMQ is not in a default location, supply the argument --zmq=<path>
* If you did recently install ZMQ to a default location,
try rebuilding the ld cache with `sudo ldconfig`
or specify zmq's location with `--zmq=/usr/local`
You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:
`--zmq=bundled`
I will now try to build libzmq as a Python extension
I already have all the above but still issues. I am guessing I have path issues i.e. may be pyzmq is looking at other location but how do I solve this problem
This is a huge issue in Windows to install ipython. I would recommend Windows users to never go the pip or easy_install way to install it. I faced a lot of issues like above. I read that it still has dependencies issues on github i.e. via pip.
I got it installed finally by this:
Download and install Anaconda
Update IPython to the current version by:
Go to Anaconda directory or look for anaconda cmd & do the following:
conda update conda
conda update ipython