当前位置:网站首页>【Power Shell】Invoke-Expression ,Invoke-Expression -Command $activateCommand; Error or power shell failed to activate the virtual environment
【Power Shell】Invoke-Expression ,Invoke-Expression -Command $activateCommand; Error or power shell failed to activate the virtual environment
2022-07-25 01:09:00 【zbossz】
power Shell As soon as you open it, there is a red letter error :
Invoke-Expression : The position of That's ok :1 character : 1164
+ ... \Xshell 7;C:\Program Files (x86)\NetSarang\Xftp 7;"C:\Program Files\N ...
+ ~~~~~~~~~~
An expression or statement contains an unexpected tag “C:\Program”.
The position of D:\Programe\Anaconda\shell\condabin\Conda.psm1:109 character : 15
+ Invoke-Expression -Command $activateCommand;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
+ FullyQualifiedErrorId : UnexpectedToken,Microsoft.PowerShell.Commands.InvokeExpressionCommand
I use a lot here It's useless The way to :
①conda init
②conda install -n root -c pscondaenvs pscondaenvs
③ hold Invoke-Expression -Command $activateCommand;
Change to
If(-not [String]::IsNullOrEmpty($activateCommand)) {
Invoke-Expression -Command $activateCommand;
}
Later, when I checked, I found that many of them had a kind of thinking , That is, there is something wrong with the system environment variables ;
So I revised it along this line
So next, we locate the wrong information 
Inside these signs , These content , It is actually a system environment variable path What's in it :


And then we put 
This variable is found :
Then we find that this variable is :
C:\Program Files\NVIDIA GPU ComputingToolkit\CUDA\v11.3\lib\x64;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin;
C:\ProgramFiles\NVIDIAGPUComputingToolkit\CUDA\v11.3\common\lib\x64;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\
Then let's take a look at the file manager 
We found that there was 2 individual cuda, Now that's it ,11.3 This environment variable is wrong again , Let's just put it directly CUDA\11.3 Delete the environment variable of . Just use cuda10.1【 Because many of my deep learning environments are installed torchgpu The version is cu101 Of , So I keep it cu101 Environment variables of 】
That's it after deletion :
You can see cuda Not in the back

This environment variable has been deleted for me , Although the final result is the same as some of the information reported in error , Because I forgot to delete the previous environment variables in the screenshot .
But this error report has been solved for us , There will be no more errors when opening :
I saw many people on the Internet who didn't use my same solution , Maybe it's because they didn't pretend like me 2 Versions CUDA, So there is no conflict . So , If you are a friend of deep learning power shell There is a problem at the beginning , It is likely that there is the same as me cuda Environment variable conflict problem , Just report the error
Delete the environment variables here 【 The premise is that you are also in conflict with multiple versions of environment variables 】
Or is it , You can consider adjusting the position of environment variables .
that , This problem is solved .End of this period , See you next time .
边栏推荐
- WhatsApp web for usability testing of software testing technology
- 7.24 party notice
- Worthington carboxyl transfer carbonic anhydrase application and literature reference
- About the difference between for... In and for... Of and object. Keys()
- Detailed usage of iperf
- Unity panel control
- The IPO of Tuba rabbit was terminated: the annual profit fell by 33%, and Jingwei Sequoia was the shareholder
- Harbor installation
- Related knowledge of paging
- Prosci anti-CD22 antibody epratuzum28 flow cytometry display
猜你喜欢

Prosci 14-3-3 (phosphate ser58) antibody instructions

What are the functions of rank function

C recursively obtains all files under the folder and binds them to the treeview control

How to implement the server anti blackmail virus system is a problem we have to consider

Unity slider slider development
![[performance optimization] MySQL common slow query analysis tools](/img/97/c7604282544c5fa8cd7e85a6ab9154.png)
[performance optimization] MySQL common slow query analysis tools

Pads copper laying
![Nacos hand to hand teaching [i] dynamic configuration of Nacos](/img/c4/ae29475c795e879683227de5ba3cfc.png)
Nacos hand to hand teaching [i] dynamic configuration of Nacos

A string "0" was actually the culprit of the collapse of station b

How to implement a state machine?
随机推荐
360 interview summary 2013 campus recruitment 2012-4-4
Worthington cytochrome c digestion study carboxypeptidase B scheme
Current events on July 20
Detailed explanation of the usage of vector, queue and stack
Unity slider slider development
MySQL series | log module
What is iftmcs indicating contract status message?
WhatsApp web for usability testing of software testing technology
Unity panel control
#648 (Div. 2)(A. Matrix Game、B. Trouble Sort、C. Rotation Matching)
Simple use of mongodb database
What are the functions of rank function
7.19 - daily question - 408
SAP Spartacus - progressive web applications, progressive web applications
Example analysis of recombinant monoclonal antibody prosci CD154 antibody
Some of my understanding about anti shake and throttling
Digital signal processing synthesis matlab design of dual tone multi frequency dialing system
Kusionstack open source | exploration and practice of kusion model library and tool chain
Where is the most formal account opening for futures trading? Capital security?
[25. Hash table]
