# Installation Issue of Python Package using CondaPkg.jl

**URL:** <https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [September 19, 2025, 3:34am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504 "2025-09-19T03:34:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 19, 2025, 3:34am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/1 "2025-09-19T03:34:19Z")

</div>

Hello,

I am recently using CondaPkg.jl to manage a conda environment in a Julia Package. However, when I tried CondaPkg.add\_pip(“fairchem-core”; version=“==2.6.0”) to install [the latest Fairchem package](https://pypi.org/project/fairchem-core/), it failed and showed the error:

```julia-auto
Error: 
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because fairchem-core==2.6.0 depends on numpy>=2.0,<2.3 and numpy==2.3.3, we can conclude
      that fairchem-core==2.6.0 cannot be used.
      And because you require fairchem-core==2.6.0, we can conclude that your requirements are
      unsatisfiable.

```

I also tried CondaPkg.add\_pip(“fairchem-core”), though it installed a very old version (v1.1.0), which is not useful.

I would appreciate it if you could give me any suggestions.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [September 19, 2025, 5:52am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/2 "2025-09-19T05:52:31Z")

</div>

You can first try to manually install an older numpy

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [September 19, 2025, 7:28am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/3 "2025-09-19T07:28:05Z")

</div>

The error message is saying that fairchem-core 2.6.0 is not compatible with numpy \>=2.3, and I’m guessing you also have a dependency on numpy==2.3.3.

You need to lower your bounds. I’d generally recommend not using exact versions but use ranges instead, such as

```julia-auto
CondaPkg.add("numpy", version=">=2.2,<3")
CondaPkg.add("fairchem-core", version=">=2.6,<3")

```

---

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 22, 2025, 6:53pm UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/4 "2025-09-22T18:53:16Z")

</div>

Hi Chris,

Sorry for my late reply.  
I have tried following your recommendation. Numpy was successfully installed, `Packages numpy (>=2.2,<3)`, while conda install cannot find the latest version of the Fairchem package.

```julia-auto
Error: 
  × failed to solve the conda requirements of 'default' 'osx-arm64'
  ╰─▶ Cannot solve the request because of: No candidates were found for fairchem-core >=2.6,<3.

```

I changed to use `CondaPkg.add_pip("fairchem-core", version=">=2.6,<3")` but the same issue showed up again

```julia-auto
Error: 
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because fairchem-core==2.6.0 depends on numpy>=2.0,<2.3 and numpy==2.3.3, we can conclude that fairchem-core==2.6.0 cannot be used.
      And because only fairchem-core<=2.6.0 is available and you require fairchem-core>=2.6, we can conclude that your requirements are unsatisfiable.

```

---

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 22, 2025, 7:07pm UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/5 "2025-09-22T19:07:03Z")

</div>

Hi Jerry,

Thanks for the suggestion. I installed the v2.1.0 Numpy and then running `CondaPkg.add_pip("fairchem-core", version=">=2.6,<3")`, the version conflict issue of Numpy was solved, though another error showed up as:

```julia-auto
Error: 
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta: __legacy__.build_wheel` failed (exit status: 1)
      
      [stdout]
      running egg_info
      writing psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to psycopg2_binary.egg-info/top_level.txt
      
      [stderr]
      path-to-user/.julia/scratchspaces/992eb4ea-22a4-4c89-a5bb-47a3300528ab/pixi_cache/uv-cache/builds-v0/.tmpW5Izhk/lib/python3.13/site-packages/setuptools/dist.py:759:
      SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      
      Error: pg_config executable not found.
      
      pg_config is required to build psycopg2 from source. Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:
      
          python setup.py build_ext --pg-config /path/to/pg_config build ...
      
      or with the pg_config option in 'setup.cfg'.
      
      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.
      
      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).
      
      
      hint: This usually indicates a problem with the package or the build environment.

```

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [September 22, 2025, 7:25pm UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/6 "2025-09-22T19:25:11Z")

</div>

Oh yes I meant `add_pip`, I didn’t spot it was a PyPI package. I think you probably also need to `CondaPkg.rm("fairchem-core")` to remove the Conda package that doesn’t exist.

---

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 22, 2025, 7:56pm UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/7 "2025-09-22T19:56:28Z")

</div>

I `add_pip` `"numpy", version=">2.0,<2.3"` and `"fairchem-core", version=">=2.6,<3"`, now the error changed to the build backend:

```julia-auto
Error: 
  × failed to solve the pypi requirements of 'default' 'osx-arm64'
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta: __legacy__.build_wheel` failed (exit status: 1)
      
      [stdout]
      running egg_info
      writing psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to psycopg2_binary.egg-info/top_level.txt
      
      [stderr]
      path-to-user/.julia/scratchspaces/992eb4ea-22a4-4c89-a5bb-47a3300528ab/pixi_cache/uv-cache/builds-
      v0/.tmpvuISgz/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License
      classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      
      Error: pg_config executable not found.
      
      pg_config is required to build psycopg2 from source. Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:
      
          python setup.py build_ext --pg-config /path/to/pg_config build ...
      
      or with the pg_config option in 'setup.cfg'.
      
      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.
      
      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).

```

Not quite sure whether it’s caused by the Fairchem package side. I will explore it further.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [September 22, 2025, 11:08pm UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/8 "2025-09-22T23:08:50Z")

</div>

> [@Jiongci](#):
>
> ```julia-auto
> If you prefer to avoid building psycopg2 from source, please install the PyPI
> 'psycopg2-binary' package instead.
> 
> ```

have you tried this?

---

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 29, 2025, 3:00am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/9 "2025-09-29T03:00:39Z")

</div>

It works, thanks for your help!  
I have another question: Is there a good way that I can create multiple Python environments in the same Julia package? So that I can install different packages to switch and avoid the version conflict of their dependent site-packages.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 29, 2025, 3:06am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/10 "2025-09-29T03:06:28Z")

</div>

> [@Jiongci](#):
>
> Is there a good way that I can create multiple Python environments in the same Julia package?

I don’t think that makes sense. One package should rely on one set of dependencies. But please open a new thread if you want to discuss this topic further.

---

<div class="post-metadata">

**Author:** ![Jiongci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jiongci/32/217325_2.png) [@Jiongci](https://discourse.julialang.org/u/Jiongci)\
**Post date:** [September 29, 2025, 3:11am UTC](https://discourse.julialang.org/t/installation-issue-of-python-package-using-condapkg-jl/132504/11 "2025-09-29T03:11:59Z")

</div>

Sure, thanks for your reminder.
