Hello, I’m new to open source development. I’m facing some problems. This mail is in markdown format (please lemme know if I should avoid this in future. I'll rewrite these issues in normal format if need be.)
I’ve been working on a conda recipe for the pysph module. The problem I’m facing currently is that when I build the recipe for pysph and install it, the files are copied into lib/python3.6/site-packages
and not lib/python3.5/site-packages
(which I want) .
Here’s what I did:
deep@deep-Lenovo-G50-80:~/condarecipe/PySPH_Project$ conda build --python=3.5 pysph
BUILD START: pysph-1.0a4-py35_0
updating index in: /home/deep/miniconda3/conda-bld/linux-64
updating index in: /home/deep/miniconda3/conda-bld/noarch
...
#lines (will print specific ones if you ask)
...
TEST END: /home/deep/miniconda3/conda-bld/linux-64/pysph-1.0a4-py35_0.tar.bz2
INFO conda_build.config:__exit__(422): --dirty flag not specified. Removing build folder after successful build/test.
# If you want to upload package(s) to anaconda.org later, type:
anaconda upload /home/deep/miniconda3/conda-bld/linux-64/pysph-1.0a4-py35_0.tar.bz2
# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes
anaconda_upload is not set. Not uploading wheels: []
deep@deep-Lenovo-G50-80:~/condarecipe/PySPH_Project$ anaconda upload /home/deep/miniconda3/conda-bld/linux-64/pysph-1.0a4-py35_0.tar.bz2
deep@deep-Lenovo-G50-80:~/condarecipe/PySPH_Project$ conda install -c tavkerdeep pysph
This copies the module into
~/miniconda3/lib/python3.6/site-packages
and not~/miniconda3/lib/python3.5/site-packages
Here’s the error message
deep@deep-Lenovo-G50-80:~$ pysph test
Traceback (most recent call last):
File "/home/deep/miniconda3/bin/pysph", line 6, in <module>
from pkg_resources import load_entry_point
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 2985, in <module>
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 2971, in _call_aside
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 2998, in _initialize_master_working_set
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 660, in _build_master
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 968, in require
File "/home/deep/miniconda3/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py", line 854, in resolve
pkg_resources.DistributionNotFound: The 'PySPH==1.0a4' distribution was not found and is required by the application
Can’t clear local builds for specific packages.
deep@deep-Lenovo-G50-80:~/miniconda3/conda-bld/linux-64$ conda install --use-local pysph
Fetching package metadata ...........
Solving package specifications: .
Warning: 2 possible package resolutions (only showing differing packages):
- local::pysph-1.0a4-0
- local::pysph-1.0a4-py35_0
Package plan for installation in environment /home/deep/miniconda3:
The following NEW packages will be INSTALLED:
pysph: 1.0a4-0 local
Proceed ([y]/n)? n
Exiting
As one can see, there are two possible package resolutions. I need to get rid of one of them or both of them. I tried to delete the tarfile for one of them and updating the index using
conda index
but it didn’t help. I was about to editrepodata.json
but after skimming through the forums, I avoided it.
deep@deep-Lenovo-G50-80:~$ cd ~/miniconda3/conda-bld/linux-64/
deep@deep-Lenovo-G50-80:~/miniconda3/conda-bld/linux-64$ ls
pyinstrument pysph-1.0a4-0.tar.bz2 repodata.json toolz-0.6.0-py35_0.tar.bz2
pyinstrument-0.13.1-py35_0.tar.bz2 pysph-1.0a4-py35_0.tar.bz2 repodata.json.bz2 toolz-0.6.0-py36_0.tar.bz2
deep@deep-Lenovo-G50-80:~/miniconda3/conda-bld/linux-64$ conda remove pysph
Fetching package metadata .........
Solving package specifications: .
PackageNotFoundError: Package not found: Conda could not find '
deep@deep-Lenovo-G50-80:~/miniconda3/conda-bld/linux-64$ conda index
updating index in: /home/deep/miniconda3/conda-bld/linux-64
deep@deep-Lenovo-G50-80:~/miniconda3/conda-bld/linux-64$ conda install --use-local pysph
Fetching package metadata ...........
Solving package specifications: .
Warning: 2 possible package resolutions (only showing differing packages):
- local::pysph-1.0a4-py35_0
- local::pysph-1.0a4-0
Package plan for installation in environment /home/deep/miniconda3:
The following NEW packages will be INSTALLED:
pysph: 1.0a4-py35_0 local
Proceed ([y]/n)? n
Exiting
So how to make sure that there is only one possible package resolution? (Or is there any way to choose which to install ? )