Conda-build: conda develop: "Error: python is not installed in <path_to_envs>/<env>"

Created on 27 Jun 2016  Â·  10Comments  Â·  Source: conda/conda-build

_From @sscherfke on June 27, 2016 9:16_

I have a python2 env created by miniconda3. When I run conda develop trunk/src inside the python2 env, I get the message "Error: python is not installed in /home/user/mniconda3/envs/myenv and no conda.pth file is created.

Output of conda info:

Current conda install:

             platform : linux-64
        conda version : 4.1.3
    conda-env version : 2.5.1
  conda-build version : 1.21.2
       python version : 3.5.1.final.0
     requests version : 2.9.1
     root environment : /home/user/miniconda3  (writable)
  default environment : /home/user/miniconda3/envs/myenv
     envs directories : /home/user/miniconda3/envs
        package cache : /home/user/miniconda3/pkgs
         channel URLs : http://***/conda/development/linux-64/
                        http://***/conda/development/noarch/
                        https://repo.continuum.io/pkgs/free/linux-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/linux-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : /home/user/.condarc
         offline mode : False
    is foreign system : False

_Copied from original issue: conda/conda#2877_

Most helpful comment

I don't have an immediate solution, but I will fix this before the next release.

All 10 comments

Sorry @sscherfke, I can't reproduce this. Here's what I've tried:

conda create -n devtest python=2.7
source activate devtest
conda develop <path to conda-build source root>

I get

added /Users/msarahan/code/conda-build
completed operation for: /Users/msarahan/code/conda-build

Is there some source code you can point me to to help reproduce the issue?

Must the path I pass to conda develop contain a certain file or something? The docs are unfortunately a bit vague.

It needs to have a setup.py file, similar to most standard Python projects.
I think conda develop was created a an alternative to the

python setup.py develop

command. I'm not sure that conda develop sees much use, though, so it may
well have bugs.

On Tue, Jun 28, 2016, 00:22 Stefan Scherfke [email protected]
wrote:

Must the path I pass to conda develop contain a certain file or
something? The docs are unfortunately a bit vague.

—
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/conda/conda-build/issues/1055#issuecomment-228951253,
or mute the thread
https://github.com/notifications/unsubscribe/AACV-cou2uci3LrewfJqbtb-eoYH1CLoks5qQK-egaJpZM4I_bp6
.

Why do I have to have setup.py when for conda-only-packages when even the conda docs disourage building conda packages from a setup.py? I thought, a conda receipt would be enough?

Also, the error message is not very helpful and misleading.

Where do the docs discourage building conda packages from a setup.py? I'm guessing the docs discourage installation of packages from PyPI using pip. That's very different.

Strictly speaking, a setup.py file is not necessary to create a conda package. You can create a conda package with conda build that bundles arbitrary content. That's different from the development mode, where conda is setting up a link to your code. Setup.py files are the standard for Python projects as descriptors of the project structure, and what to install. Conda recipes do not have the notion of project links - we rely on the existing notions. This is not to say that we can't support that someday. I think it's a good idea to not need setup.py, because conda recipes are more straightforward than setup.py.

Sorry for the confusion. I'll try to clean up the error message.

http://conda.pydata.org/docs/bdist_conda.html, first paragraph ;-)

I am new to the conda eco system. I thought I don't need setup.py because it would be redundant with the conda receipt …

I am having the same issue. conda develop just stopped working. Both on my mac and windows pc. Has anubody found a problem/solution?

$ conda develop C:\dev\code_qrm\validation
Error: python is not installed in C:\dev\bin\miniconda

$ conda info
Current conda install:
             platform : win-64
        conda version : 4.1.11
    conda-env version : 2.5.1
  conda-build version : 1.21.11+0.g5b44ab3.dirty
       python version : 2.7.10.final.0
     requests version : 2.10.0
     root environment : C:\dev\bin\miniconda  (writable)
  default environment : C:\dev\bin\miniconda
     envs directories : C:\dev\bin\miniconda\envs
        package cache : C:\dev\bin\miniconda\pkgs
         channel URLs : ....
          config file : C:\Users\dgrigonis\.condarc
         offline mode : False
    is foreign system : False

$ conda list
conda                     4.1.11                   py27_0
conda-build               1.21.11                  py27_0
console_shortcut          0.1.1                    py27_1
backports                 1.0                      py27_0    http://conda:82/CI
configparser              3.5.0b2                  py27_1    http://conda:82/CI
flake8                    2.3.0                    py27_0    http://conda:82/CI
future                    0.15.2                   py27_0    http://conda:82/CI
gmt-build                 1.0.4                    py27_0    http://conda:82/CI
jinja2                    2.8                      py27_0    http://conda:82/CI
markupsafe                0.23                     py27_0    http://conda:82/CI
mccabe                    0.3                      py27_1    http://conda:82/CI
pep8                      1.6.2                    py27_0    http://conda:82/CI
psutil                    3.3.0                    py27_0    http://conda:82/CI
pyflakes                  0.8.1                    py27_0    http://conda:82/CI
python                    2.7.10                        0    http://conda:82/CI
six                       1.10.0                   py27_0    http://conda:82/CI
conda-env                 2.5.1                    py27_0    http://conda:82/PROD
menuinst                  1.4.1                    py27_0
patch                     2.5.9                         1
pip                       8.1.2                    py27_0
pycosat                   0.6.1                    py27_1
pycrypto                  2.6.1                    py27_4
pyyaml                    3.11                     py27_4
requests                  2.10.0                   py27_0
ruamel_yaml               0.11.14                  py27_0
setuptools                23.0.0                   py27_0
vs2008_runtime            9.00.30729.1                  2
wheel                     0.29.0                   py27_0

$ ls -l C:\dev\code_qrm\validation
-rw-r--r-- 1 dgrigonis 1049089  61 Nov 30  2015 README.md
drwxr-xr-x 1 dgrigonis 1049089   0 Dec  1  2015 gmt/
drwxr-xr-x 1 dgrigonis 1049089   0 Aug 16 09:49 gmt_risk_validation.egg-info/
drwxr-xr-x 1 dgrigonis 1049089   0 Jun 16 11:56 notebooks/
drwxr-xr-x 1 dgrigonis 1049089   0 Jun 16 11:56 scripts/
-rw-r--r-- 1 dgrigonis 1049089 128 Nov 30  2015 setup.py
-rw-r--r-- 1 dgrigonis 1049089 262 Feb 19 14:40 setup.pyc
drwxr-xr-x 1 dgrigonis 1049089   0 May  6 16:41 testing_convergence/
drwxr-xr-x 1 dgrigonis 1049089   0 Aug  1 15:48 testing_regression/
drwxr-xr-x 1 dgrigonis 1049089   0 Jul 26 10:06 validations/
drwxr-xr-x 1 dgrigonis 1049089   0 Aug  8 12:38 workspaces/

I don't have an immediate solution, but I will fix this before the next release.

Hi, I had the same issue, for me it worked to downgrade to conda 4.0 (conda install conda=4.0), then remove conda-build and reinstall with the (--no-update-dependencies) flag

I also get an error when trying to conda develop in a python 2.7 env using miniconda with python 3.5. I only get another error:

(docs) joris@joris-XPS-13-9350:~/scipy/pandas$ conda develop -b .
running build_ext
...
Completed: python /home/joris/scipy/pandas/setup.py build_ext --inplace
===============================================
Traceback (most recent call last):
  File "/home/joris/miniconda3/bin/conda-develop", line 6, in <module>
    sys.exit(conda_build.cli.main_develop.main())
  File "/home/joris/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_develop.py", line 72, in main
    return execute(sys.argv[1:])
  File "/home/joris/miniconda3/lib/python3.5/site-packages/conda_build/cli/main_develop.py", line 68, in execute
    build_ext=args.build_ext, clean=args.clean, uninstall=args.uninstall)
  File "/home/joris/miniconda3/lib/python3.5/site-packages/conda_build/api.py", line 186, in develop
    return execute(recipe_dir, prefix, no_pth_file, build_ext, clean, uninstall)
  File "/home/joris/miniconda3/lib/python3.5/site-packages/conda_build/develop.py", line 191, in execute
    write_to_conda_pth(sp_dir, pkg_path)
  File "/home/joris/miniconda3/lib/python3.5/site-packages/conda_build/develop.py", line 50, in write_to_conda_pth
    with open(c_file, 'a') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/joris/miniconda3/envs/docs/lib/python3.5/site-packages/conda.pth'

So it wants to find/put a conda.pth file in lib/python3.5, but since it is a python 2.7 environment, this of course does not exist.

Was this page helpful?
0 / 5 - 0 ratings