DEV Community

Discussion on: Using Anaconda On Sublime Text (without installing any package)

Collapse
 
mikechen66 profile image
mikechen66

Thanks for your sharing. My problem is that Anaconda3 is installed as defaulated Just Me, not All Users(in Program\Data) as you mentioned. I know that its dirname of C:\Users\Administrator while adding my path to the environment of Win 10. I can get the path of Anaconda3 by the command 'where conda'. However, I could not use the the following command to get the dirname. Can you figure out how to solve the problem as follows.

import os
os.path.dirname(Anaconda3, file)

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\Anaconda3\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\Users\Administrator\Anaconda3\lib\ntpath.py", line 183, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

or

import Anaconda 3, os
path = os.path.dirname(Anaconda3.file)

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\Anaconda3\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\Users\Administrator\Anaconda3\lib\ntpath.py", line 183, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Thanks for your help in advance.

Mike

Collapse
 
mikechen66 profile image
mikechen66

Sorry, the 'file'included in the parentheses in the first comment should include leading double underscore and rear double underscore. But the dialog box of the dev.to system cut the underscore lines automatically in the first comment.So I have to give you the second comment for reference.

Thanks,

Mike

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

Try brutely searching for all python.exe and try the one in anaconda folders