Не получается установить Anaconda в Virtual Environment, как подступиться?
3. conda env create
wait for the environment to create.
4. Activate the environment (Mac/Linux)
conda activate ztdl
5. conda activate ztdl
Check that your prompt changed to
(ztdl) $
6. Launch Jupyter Notebook
jupyter notebook
7. Run the Check environment Notebook
Go to the course folder, open the notebook 0_Check_Environment.ipynb and run it. If you see the message:
Houston we are go!
но последний чек не проходит и получаю:
плюс:
no module name tensorflow, хотя когда смотрю содержимое через pip (pip list) то всё включено в лист установленных файлов.
т.е., как я понимаю, где то не установлен PATH Anaconda на/черeз виртуалку.
______________________________________________________________________________________
Тут же, кстати, хочу заметить что каждый раз запуская терминал, сразу же получаю 3 сообщения:
-bash: conda: command not found
______________________________________________________________________________________
Поэтому что пытался:
нашел где то через гугль
export PATH=»/home/username/anaconda3/bin:$PATH» to my .bachrc
(open by typing vim ~/.bashrc)
Add this to your .zshrc:
export PATH=»/home/username/anaconda3/bin:$PATH»
(open by typing vim ~/.zshrc)
Make sure to replace /home/username/anaconda3 with your actual path.
____________________________________________________________________________
открываю .bashrc в котором вижу
export PATH=»$PATH:$HOME/.rvm/bin» # Add RVM to PATH for scripting
снизу добавил:
export PATH=»/home/IvanIvanov1/anaconda3/bin:$PATH»
_________________________________________________________________
далее: открываю /.zshrc и вставляю:
export PATH=»/home/IvanIvanov1/anaconda3/bin:$PATH»
(кроме этой записи больше в файле ничего нет)
_________________________________________________________________________________________________________
Нашел еще след.ответ на stack overflow:
https://stackoverflow.com/questions/46969296/anaco.
в кот. у меня сейчас:
export PATH=»$PATH:$HOME/.rvm/bin» # Add RVM to PATH for scripting
[[ -s «$HOME/.rvm/scripts/rvm» ]] && source «$HOME/.rvm/scripts/rvm» # Load RVM into a shell session *as a function*
[[ -s «$HOME/.rvm/scripts/rvm» ]] && source «$HOME/.rvm/scripts/rvm» # Load RVM into a shell session *as a function*
# added by Anaconda3 5.1.0 installer
# export PATH=»/anaconda3/bin:$PATH» # commented out by conda initialize
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH=»/Library/Frameworks/Python.framework/Versions/3.7/bin:$»
export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH=»/Library/Frameworks/Python.framework/Versions/3.7/bin:$»
export PATH
conda activate
conda activate
# . /anaconda3/etc/profile.d/conda.sh # commented out by conda initialize
# conda activate # commented out by conda initialize
# . /anaconda3/etc/profile.d/conda.sh # commented out by conda initialize
# conda activate # commented out by conda initialize
conda activate
# . /anaconda3/etc/profile.d/conda.sh # commented out by conda initialize
# >>> conda initialize >>>
# !! Contents within this block are managed by ‘conda init’ !!
__conda_setup=»$(‘/anaconda3/bin/conda’ ‘shell.bash’ ‘hook’ 2> /dev/null)»
if [ $? -eq 0 ]; then
eval «$__conda_setup»
else
if [ -f «/anaconda3/etc/profile.d/conda.sh» ]; then
. «/anaconda3/etc/profile.d/conda.sh»
else
export PATH=»/anaconda3/bin:$PATH»
fi
fi
unset __conda_setup
#
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH=»/Library/Frameworks/Python.framework/Versions/3.7/bin:$»
export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH=»/Library/Frameworks/Python.framework/Versions/3.7/bin:$»
export PATH
# added by Anaconda3 2019.03 installer
# >>> conda init >>>
# !! Contents within this block are managed by ‘conda init’ !!
__conda_setup=»$(CONDA_REPORT_ERRORS=false ‘/Users/IvanIvanov1/anaconda3/bin/conda’ shell.bash hook 2> /dev/null)»
if [ $? -eq 0 ]; then
\eval «$__conda_setup»
else
if [ -f «/Users/IvanIvanov1/anaconda3/etc/profile.d/conda.sh» ]; then
. «/Users/IvanvIvanov1/anaconda3/etc/profile.d/conda.sh»
CONDA_CHANGEPS1=false conda activate base
else
\export PATH=»/Users/IvanIvanov1/anaconda3/bin:$PATH»
fi
fi
unset __conda_setup
#
____________________________________________________________________________________________
Подскажите пожалуйста куда что писать и в правильном ли я вообще направлении
- Вопрос задан более трёх лет назад
- 245 просмотров
Как установить Anaconda на Windows
Если при установке появляются проблемы, попробуйте временно отключить антивирусное ПО, а затем снова включить его после установки. Если Anaconda была установлена для всех пользователей, нужно удалить ее и переустановить для одного пользователя.
Устанавливайте Anaconda в папку, имя которой не содержит пробелов и символов unicode (например, кириллицу)
Не устанавливайте с правами Администратора, если такие не запрашивались

Для установки Anaconda без PyCharm просто нажмите кнопку «Далее» (Next)

Configure a conda virtual environment
PyCharm supports creating virtual environments for Python with Conda. The following procedure applies to all supported operating systems. Use the platform switcher at the top of this page to view shortcuts specific to your operating system.
Create a conda environment

- Ensure that Anaconda or Miniconda is downloaded and installed on your computer, and you’re aware of a path to its executable file. For more information, refer to the installation instructions.
- Do one of the following:
- Click the Python Interpreter selector and choose Add New Interpreter .
- Press Control+Alt+S to open Settings and go to Project: | Python Interpreter . Click the Add Interpreter link next to the list of the available interpreters.
- Click the Python Interpreter selector and choose Interpreter Settings . Click the Add Interpreter link next to the list of the available interpreters.
- Select Add Local Interpreter .
- In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment .
- The following actions depend on whether you want to create a new conda environment or to use an existing one. New conda environment
- Select the Python version from the list.
- Normally, PyCharm will detect conda installation. Otherwise, specify the location of the conda executable, or click to browse for it.
- Specify the environment name.
Existing conda environment
- Choose the desired environment from the list.
The selected conda environment will be reused for the current project.
If the directory with your source files contains an environment.yml file, PyCharm can create a conda environment based on it.
Create a conda environment based on environment.yml
- Do one of the following:
- Go to File | Open .
- On the Welcome Screen, click Open .
- Browse for the directory which contains your source files and the environment.yml file, and then click Open (on Mac) or OK (on Windows):

- If you didn’t create a project and configure a Python interpreter in that directory before, PyCharm suggests creating a conda environment:

- Keep the suggested options, or specify an alternative Conda executable. Click OK to complete the task.
Once you click OK , PyCharm creates an environment and installs all the required packages.

Note that if you ignore a suggestion to create a Conda environment, PyCharm won’t create a Python interpreter for your project. So, any time when you open a .py file, you’ll see the warning with the options for configuring a project interpreter:
For any of the configured Python interpreters (but Docker-based), you can:
- Manage interpreter paths
- Install, uninstall, and upgrade packages
Finding your Anaconda Python interpreter path#
IDEs often require you to specify the path to your Python interpreter.
This path varies according to which operating system version and which Anaconda version you use, so you will need to search your file system to find the correct path to your Python interpreter.
You can search for the Python interpreter with your operating system’s file manager, such as File Explorer on Windows, Finder on macOS, or Nautilus on Ubuntu Linux.
You can also use the command line to show the location of the Python interpreter in the active conda environment.
Windows#
- From the Start Menu open the Anaconda Prompt.
- If you want the location of a Python interpreter for a conda environment other than the root conda environment, run activate environment-name .
- Run where python .
macOS and Linux#
- Open a terminal window.
- If you want the location of a Python interpreter for a conda environment other than the root conda environment, run conda activate environment-name .
- Run which python .
Examples#
- Windows 10 with Anaconda3 and username “jsmith”– C:\Users\jsmith\Anaconda3\python.exe . The Python image in a conda environment called “my-env” might be in a location such as C:\Users\jsmith\Anaconda3\envs\my-env\python.exe
- macOS– ~/anaconda/bin/python or /Users/jsmith/anaconda/bin/python
- Linux– ~/anaconda/bin/python or /home/jsmith/anaconda/bin/python
Instead of anaconda , the folder in your home directory might be named one of the following:
If you have installed Miniconda instead of Anaconda, the folder might be named:
- miniconda
- miniconda2
- miniconda3