-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install this package failed within the conda env managed by pyenv. #4
Comments
First,
Rather than using python setuptools, this project uses conda "recipes" to manage its installation. |
Second, using both PyEnv and Anaconda at the same time is unusual. Both allow you to manage environments and manage projects using different versions of Python. PyEnv is much simpler and specific to Python, whereas Anaconda is more complex, has more features, and is not redistricted to just Python. Using both at the same time will lead to some confusion. You may be better off sticking to one of the two for any project. The following creates and activates a python-3.6 environment.
Check out https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html# for more details, especially on maintaining lists of environment packages. |
Kal Hodgson <notifications@github.com> 于2019年12月19日周四 下午7:26写道:
Second, using both PyEnv and Anaconda at the same time is unusual. Both
allow you to manage environments and manage projects using different
versions of Python. PyEnv is much simpler and specific to Python, whereas
Anaconda is more complex, has more features, and is not redistricted to
just Python. Using both at the same time will lead to some confusion. You
may be better off sticking to one of the two for any project.
But the pyenv itself has the install list for anaconda. So, I think the
author of pyenv should have considered for the co-operation of them when
using pyenv to install anaconda.
For my case, I often use pyenv + pipenv, but sometimes the pipenv cannot
solve the problem of complex packages dependence problem, say for this
project:
https://github.com/mbeyeler/opencv-machine-learning
But the conda can do the trick.
OTOH, I've found the following website:
Manage Python environment with Pyenv + Anaconda + Pipenv | Hanezu
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html>
It says that:
Pipenv is great. But it is not a perfect solution. Besides, sometimes it is
convenient if we can use anaconda to manage some libraries that does not
work well with pip.
Luckily, it is possible to take the best of two worlds.
1. Step 1: install Pyenv
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-1-install-pyenv>
2. Step 2: install anaconda
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-2-install-anaconda>
3. Step 3: install anaconda packages
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-3-install-anaconda-packages>
4. Step 4: install pipenv
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-4-install-pipenv>
5. Step 5: Setup virtual environment of the repository
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-5-setup-virtual-environment-of-the-repository>
6. Step 6: install packages via Pipenv
<https://hanezu.net/posts/Manage-Python-environment-with-Pyenv-Anaconda-Pipenv.html#step-6-install-packages-via-pipenv>
7. ...
So I do the try for this thing.
… The following creates and activates a python-3.6 environment.
conda create -n myenv python=3.6
conda activate myenv
Check out
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#
for more details, especially on maintaining lists of environment packages.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACVDTDV6P2Y2WWEF7YGAXQ3QZNK73A5CNFSM4J5AUADKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHJJ44I#issuecomment-567451249>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVDTDXVNS4I3TJ7R42NE3LQZNK73ANCNFSM4J5AUADA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
Thanks @hongyi-zhao. It's an interesting approach, but IMHO it does add multiple layers of complexity that may cause problems later on. The recommended advice is currently to do all your 'pip' actions inside a conda environment. (See https://www.anaconda.com/using-pip-in-a-conda-environment/). This is the opposite of what the above blog suggests 😞 There is a new experimental 'pip' interoperability mode https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/pip-interoperability.html that can be of some help. You may find the following helpful: https://www.anaconda.com/understanding-conda-and-pip/. |
Anyway. Enjoyable discussion 😄, but I'm going to close the issue since it was a simple misunderstanding about the nature of this project, and |
Thanks a lot for you to let me know this interesting and magic feature. Regards
|
Hi,
I use the pyenv to install and manage the anaconda python distribution as follows:
$ pyenv install anaconda3-4.3.0
Then I enable this environment for my project:
$ mkdir myproject
$ cd myproject
$ pyenv local anaconda3-4.3.0
Then I try to install the git version of conda-bash-completion into this environment as follows:
$ conda install git pip
Then try install as follows but failed:
The text was updated successfully, but these errors were encountered: