-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to add path in Anaconda3/pkgs
to Pythonpath manager leads to an error
#22827
Comments
Hey @Rg111Ga31, thanks for reporting. You said:
The way to solve this problem is not to add the path where conda downloaded The reason is that mixing Python packages from different installations like that causes odd errors or segfaults. Instead, you need to select the environment where you installed
To address this issue we'll add a new rule to prevent users from adding packages located in |
Anaconda3/pkgs
to Pythonpath manager leads to an error
@mrclary, could you take a look at this one? |
Regarding the traceback, this is an issue I discovered and is fixed in #21769. This issue occurs because @Rg111Ga31, if you close and reopen PYTHONPATH Manager, then try to add your path first, before removing any paths, then you should succeed. However, as @ccordoba12 recommends, you should not add paths that belong to other environments as this may cause other issues. @ccordoba12, I can add |
Thanks Carlos for the suggestions. However I am concerned that when I use
Navigator to update From Spyder 5.5.1 to Spyder 6.0.1 the path information
within Anaconda3 is NOT automatically made available to the latter version
as it was for Spyder 5. Your suggestions seem to more properly apply to
the Spyder installer version not the Anaconda3 update version where a
compatibility issue seems to exist.
…On Mon, Nov 4, 2024 at 10:48 AM Carlos Cordoba ***@***.***> wrote:
Hey @Rg111Ga31 <https://github.com/Rg111Ga31>, thanks for reporting. You
said:
An attempt to overcome the problem:
run zsni -in testosterone.smi
Traceback (most recent call last):
File D:\ICDD_PDF\TOOLS_2020\LexiChemTK\Struct_Name\SmiNamImg\zsni.py:17
from openeye import oechem
ModuleNotFoundError: No module named 'openeye'
The way to solve this problem is not to add the path where conda
downloaded openeye to your environment through our Pythonpath manager
(and fortunately there's a bug in it which prevented you to do that).
The reason is that mixing Python packages from different installations
like that causes odd errors or segfaults.
Instead, you need to select the environment where you installed openeye
and start a console for it. There are two options to do it:
- Go to the menu Consoles > New console in environment and select your
environment from the listed shown there.
- Go to the menu Tools > Preferences and then Python Interpreter > Use
the following interpreter and select there the path to the Python
executable from your environment.
------------------------------
To address this issue we'll add a new rule to prevent users from adding
packages located in Anaconda3\pkgs or similar directories, and take a
look at the unassigned variable bug in your traceback above.
—
Reply to this email directly, view it on GitHub
<#22827 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI6PCMVFUB5BLOAZLPGHCDZ66QPBAVCNFSM6AAAAABRC5EKGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJVGIYDSOBWGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
r O Y
|
To @mrclary:
Since this is a bug that seriously affects how the Pythonpath manager works, I'd prefer to have a fix for it in our stable branch. So, could you cherry-pick the commit you did to fix that and add it to another branch?
That's even more important to include in our next version to avoid people using our Pythonpath manager in a way that was not designed for. You could add those changes to the same branch I mentioned above. To @Rg111Ga31:
You're right, it won't be because adding directories placed in
That's not correct. As I said above:
It seems in your case you have several environments, install packages in one or more of them, are unable to find them in Spyder and resort to add their directories in That's a horrible practice because environments have to be activated for their packages to work properly. Furthermore, packages from different Python versions (e.g. 3.9 and 3.12) can't be mixed and used in the same environment (the exception is that they are pure Python packages, but not many of them are in the scientific space). So, this is something we must do. |
Description
What steps will reproduce the problem?
An attempt to overcome the problem:
run zsni -in testosterone.smi
Traceback (most recent call last):
File D:\ICDD_PDF\TOOLS_2020\LexiChemTK\Struct_Name\SmiNamImg\zsni.py:17
from openeye import oechem
ModuleNotFoundError: No module named 'openeye'
where 'openeye' is a component of Anaconda3>pkgs>openeye-toolkits-2022.2.2-py310_0
Traceback
Versions
Dependencies
Environment
Environment
The text was updated successfully, but these errors were encountered: