I have two Conda environment:
snakemake- I set up this one first and had been using it without issue. It does not have MOSEK solver in it.
aa - I recently set up this environment, and MOSEK was installed.
After aa is set up and MOSEK installed into it, I have the following error while trying to import pulp in snakemake:
>>> import pulp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/juno/work/iacobuzc/haochen/mambaforge/envs/snakemake/lib/python3.11/site-packages/pulp/__init__.py", line 34, in <module>
from .pulp import *
File "/juno/work/iacobuzc/haochen/mambaforge/envs/snakemake/lib/python3.11/site-packages/pulp/pulp.py", line 99, in <module>
from .apis import LpSolverDefault, PULP_CBC_CMD
File "/juno/work/iacobuzc/haochen/mambaforge/envs/snakemake/lib/python3.11/site-packages/pulp/apis/__init__.py", line 7, in <module>
from .mosek_api import *
File "/juno/work/iacobuzc/haochen/mambaforge/envs/snakemake/lib/python3.11/site-packages/pulp/apis/mosek_api.py", line 32, in <module>
class MOSEK(LpSolver):
File "/juno/work/iacobuzc/haochen/mambaforge/envs/snakemake/lib/python3.11/site-packages/pulp/apis/mosek_api.py", line 40, in MOSEK
env = mosek.Env()
^^^^^^^^^
AttributeError: module 'mosek' has no attribute 'Env'
What did you expect to see?
What did you see instead?
Useful extra information
My guess is that perhaps I installed MOSEK into the base environment and had to remove it and reinstall into aa, or have some environment variables set or that I have the MOSEK license at ~/mosek/mosek.lic, MOSEK is detected by pulp in snakemake but imported as an empty script (per this issue https://groups.google.com/g/mosek/c/MB_-kH-mSaQ).
Details for the issue
What did you do?
I have two Conda environment:
snakemake
- I set up this one first and had been using it without issue. It does not have MOSEK solver in it.aa
- I recently set up this environment, and MOSEK was installed.After
aa
is set up and MOSEK installed into it, I have the following error while trying toimport pulp
insnakemake
:What did you expect to see?
What did you see instead?
Useful extra information
My guess is that perhaps I installed MOSEK into the base environment and had to remove it and reinstall into
aa
, or have some environment variables set or that I have the MOSEK license at~/mosek/mosek.lic
, MOSEK is detected by pulp insnakemake
but imported as an empty script (per this issue https://groups.google.com/g/mosek/c/MB_-kH-mSaQ).I changed this line to:
And it seems to have solved the error.
The info below often helps, please fill it out if you're able to. :)
What operating system are you using?
I'm using python version:
I installed PuLP via:
Did you also