Two python site-packages

232
5
04-24-2020 11:15 AM
AntónioBrandão
New Contributor

Hello when I install ArcGis 10.7.1, since I already had a previous Python version installed in "C:\Python27", I decided to change to another folder "C:\Python2716". Now I know that the installation in the same folder would not create a conflict with the previous version since the ArcGis install it in another folder "C:\Python2716\ArcGIS10.7". Now I moved the folder Arcgis to "C:\Python27\ArcGIS10.7" and changed the windows paths.

 

Now the paths are:

>>> import os
>>> print os.sys.path
['', 'C:\\Windows\\system32', 'C:\\Python27\\ArcGIS10.7\\Lib\\idlelib', 'C:\\Windows\\SYSTEM32\\python27.zip', 'C:\\Python27\\ArcGIS10.7\\DLLs', 'C:\\Python27\\ArcGIS10.7\\lib', 'C:\\Python27\\ArcGIS10.7\\lib\\plat-win', 'C:\\Python27\\ArcGIS10.7\\lib\\lib-tk', 'C:\\Python27\\ArcGIS10.7', 'C:\\Users\\Antonio\\AppData\\Roaming\\Python\\Python27\\site-packages', 'C:\\Python27\\ArcGIS10.7\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.7\\bin', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.7\\ArcPy', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.7\\ArcToolBox\\Scripts', 'C:\\Program Files (x86)\\ArcGIS\\WMX\\Desktop10.7\\bin', 'C:\\Program Files (x86)\\ArcGIS\\WMX\\Desktop10.7\\arcpy']

And the ArcGis software doesn't start. I suppose there is a conflict in the "site-packages" because now it have two places for the library's.

When I use:

>>> import site
>>> site.getsitepackages()
['C:\\Python27\\ArcGIS10.7', 'C:\\Python27\\ArcGIS10.7\\lib\\site-packages']

it only tell me that is this one.

I need do install install Numpy 1.9.3 as required.

I understand that could be more like a system question but maybe in Esri community I can have a better answer that is in respect to the software.

 

I don't want to uninstall the Arcgis, because is a student version and I don't want to wait for a week for another license.

Is there any way to solve?

 

Thanks.

0 Kudos
5 Replies
JoshuaBixby
MVP Esteemed Contributor

I know you don't want to uninstall and reinstall, but that really is the best path forward.  Esri doesn't disclose what Python paths are stored and where, so there is a high likelihood of gremlins popping up even if you appear to get it working.

Or, why not just leave the Python install C:\Python2716, what is compelling you to change it to C:\Python27?

0 Kudos
AntónioBrandão
New Contributor

Hello Joshua, I just realize that in previous installations I installed python in "Python27" folder and that's why I wanted to change, always for the curiosity to learn. But if ESRI doesn't disclosure Python paths I will keep it. In fact I was waiting for an answer to try again, since I already revert the situation.

Another thing, If I uninstall the student version can I use the same license number to activate it again or do I have to ask for a new one?

Thank you.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

You could simply remove the python installations through Windows Add/Remove Programs, then repair ArcMap/Pro through the same access point, but when you go to Remove it, you select Repair.

Or it is probably the same as "transfering" a license

just deauthorize it first

How To: Transfer an ArcGIS Desktop license to a different machine 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

In general, Desktop licenses can be returned and re-activated, but I also know there are some additional restrictions with certain types of licenses.  From your original question, it seems you don't want to risk being down/offline for a week waiting for another license if you need one, so I would just leave well enough alone for now unless the alternate Python path is causing an issue.

0 Kudos
AntónioBrandão
New Contributor

Thanks to all. For now I will keep the Python paths. One of  these days I will try Dan Patterson help.

0 Kudos